Last Updated: February 25, 2016
·
1.862K
· karthiks

Vim: Make it easy to update/reload your .vimrc

:e $MYVIMRC 

to directly edit your vimrc profile

:source $MYVIMRC 

to reload your vimrc profile

Mappings may make it even easier. Copy paste the below snippet in your .vimrc for keyboard shortcuts to update/reload your .vimrc profile.

" source $MYVIMRC reloads the saved $MYVIMRC
:nmap <Leader>s :source $MYVIMRC

" opens $MYVIMRC for editing, or use :tabedit $MYVIMRC
:nmap <Leader>v :e $MYVIMRC

<Leader> is \ by default, so those commands can be invoked by doing \v and \s

Happy learning!