Run autocommands on autosave in neovim

This commit is contained in:
Talia 2021-08-17 17:40:50 +02:00
parent 265e3a4ba6
commit 1af4a1aaae

View file

@ -2,7 +2,13 @@
function! TryAutosave() function! TryAutosave()
if &autowriteall && &mod && &buftype=="" if &autowriteall && &mod && &buftype==""
silent write if has("nvim")
do BufWritePre
silent write
do BufWritePost
else
silent write
end
redraw redraw
end end
endfunction endfunction