Skip to content

Instantly share code, notes, and snippets.

View johnend's full-sized avatar

John Enderby johnend

  • FanDuel
  • Edinburgh (UK)
  • 05:38 (UTC +01:00)
View GitHub Profile
-- lua/config/autosave.lua
vim.g.autosave_enabled = true
local group = vim.api.nvim_create_augroup("autosave", { clear = true })
vim.api.nvim_create_autocmd({ "BufLeave", "FocusLost", "VimLeavePre" }, {
group = group,
callback = function(event)
if not vim.g.autosave_enabled then

Keybase proof

I hereby claim:

  • I am johnend on github.
  • I am johnend (https://keybase.io/johnend) on keybase.
  • I have a public key ASA8afuzUxkjPIcbe2UQNNuKdaC3f-tXli25eKEWLO7vSAo

To claim this, I am signing this object: