Vim tip: reload your vimrc

If you’re changing your vimrc, it can get boring to close and restart it only to see the changes applied. Want something quicker? You can “:so %”. So stands for source, so you’ll just be telling vim “include this file”. % happens to be the path to the current file. If you’re not editing your .vimrc but for some reason you still want to reload it, just use “so ~/.vimrc” instead.

Advertisements

2 Comments on “Vim tip: reload your vimrc”

  1. Anonymous says:

    augroup MyAutoCmd
    ” Clear autocmds for this group
    autocmd!

    " Automatically load vimrc when it is saved
    autocmd bufwritepost $MYVIMRC source $MYVIMRC
    

    augroup end


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s