A blog dedicated to text editing and general exploration of computing knowledge
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...
Anything wrong with this form?:au! BufWritePost $MYVIMRC source $MYVIMRC
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