" auto_file.vim - Automatically file reading, saving; directory changer. " Autoread " " http://vim.wikia.com/wiki/Have_Vim_check_automatically_if_the_file_has_changed_externally " http://stackoverflow.com/questions/2490227/how-does-vims-autoread-work " http://stackoverflow.com/questions/2490227/how-does-vims-autoread-work "au FocusGained,BufEnter * :silent! ! "au FocusLost,WinLeave * :silent! w " Autosave " See https://github.com/vim-scripts/vim-auto-save "let g:auto_save = 1 " Auto change dir " " Automatically set the current working directory to the current buffer file's " directory " " See http://vim.wikia.com/wiki/Set_working_directory_to_the_current_file "set autochdir augroup changedir autocmd! autocmd BufEnter * silent! lcd %:p:h augroup END