Reload .vimrc in Vim without restart

:source ~/.vimrc

Run that from inside vim, that will apply your .vimrc

Alternately

:source $MYVIMRC


Here's one for posterity. Add the following to your .vimrc:

map <leader>vimrc :tabe ~/.vim/.vimrc<cr>
autocmd bufwritepost .vimrc source $MYVIMRC

The first line means you can open your vimrc from any vim buffer by typing your leader, then writing "vimrc." For example, my leader is set to comma, so if I'm in edit mode and I type ",vimrc" it opens my vimrc in a new tab.

The second line automatically sources the changes to your vimrc when you save and close it. It's magic.


:so %

if currently editing .vimrc

Tags:

Vim