Skip to content

Commit

Permalink
Settings: Implement autosave on focus lost (disabled by default) enab…
Browse files Browse the repository at this point in the history
…led by the presence of g:autosave_on_blur

This auto-command will save all buffers when focus is lost and is only
activated on the presence of g:autosave_on_blur

echo 'let g:autosave_on_blur = 1' >> ~/.vimrc.before

closes carlhuda#4
  • Loading branch information
kalbasit committed Nov 27, 2011
1 parent 38cb604 commit 41c1072
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions janus/vim/core/before/plugin/settings.vim
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@ if has("autocmd")
au FileType python set softtabstop=4 tabstop=4 shiftwidth=4 textwidth=79
endif

""
"" Auto Commands
""

if has("autocmd")
if exists("g:autosave_on_blur")
au FocusLost * silent! wall
endif
endif

""
"" General Mappings (Normal, Visual, Operator-pending)
""
Expand Down

0 comments on commit 41c1072

Please sign in to comment.