Add autosave environment variable check in vim

This commit is contained in:
Talia 2020-07-22 11:09:52 +02:00
parent f2598c47fb
commit d490d3ce2d
1 changed files with 4 additions and 0 deletions

View File

@ -9,6 +9,10 @@ function! TryAutosave()
end
endfunction
if exists("$AUTOSAVE")
set autowriteall
end
augroup autosave
autocmd!
autocmd BufLeave * call TryAutosave()