Last Updated: September 09, 2019
·
1.446K
· lokiastari

Auto reload .vimrc after write

Add the following to your ${HOME}/.vimrc file

" Source the vimrc file after saving it
if has("autocmd")
    autocmd bufwritepost .vimrc source $MYVIMRC
endif

If you edit your .vimrc it will automatically be reloaded once you write it. This makes changes to .vimrc dynamic and you do not need to restart vim.