up vote 16 down vote favorite
8
share [g+] share [fb]

Can you edit your .vimrc file in vim, and reload it without restarting vim?

link|improve this question
feedback

1 Answer

up vote 27 down vote accepted

If you're editing it, you can reload it with:

:so %

% stands for current file name (see :h current-file) and :so is short for :source, which reads the content of the specified file and treats it as Vim code.

In general, to re-load the currently active .vimrc, use the following (see Daily Vim):

:so $MYVIMRC
link|improve this answer
what's the meaning of this command? – ivo Apr 17 '10 at 14:25
1  
Have a look at stackoverflow.com/questions/803464/… – mrucci Apr 17 '10 at 14:27
3  
just found out that :so $MYVIMRC also works – ivo Apr 17 '10 at 15:16
and :so ~/.vimrc should work too on unix – Yab May 8 '11 at 18:18
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.