You can quickly and easily reload your vimrc with the following command.
:source $MYVIMRC
If you want to know what your current vimrc is, just do the following.
:echo $MYVIMRC
Tuesday, November 25, 2008
Subscribe to:
Post Comments (Atom)
A blog dedicated to text editing and general exploration of computing knowledge
5 comments:
I don't see much point in sourcing your .vimrc unless you've been editing it. If so, then 'so %' is the quickest way to put your changes into effect. The only drawback with this is that if, say, you delete a :map from your .vimrc, merely sourcing it will leave that :map around. I wish I knew a way of starting everything from scratch (not just :maps) without exiting and restarting. Quibbles aside, rock on, Daily Vim!
I did not know about ':so %'. Awesome tip, and thanks for coming to the site!
I have the following autocommand in my ~/.vimrc, so that whenever I write the file ~/.vimrc, it gets automatically sourced:
au! BufWritePost .vimrc source %
@dominiko: Nice. that will save me lots of typing :source...
There is a point in doing source $MYVIMRC... when you work in screen with many tabs and many vim instances open.
Thanks for the tip.
Post a Comment