Run autocommands on autosave in neovim

This commit is contained in:
Talia 2021-08-17 17:40:50 +02:00
parent 265e3a4ba6
commit 1af4a1aaae
1 changed files with 7 additions and 1 deletions

View File

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