syntax highlight

Thursday, 18 June 2015

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.

2 comments:

  1. augroup MyAutoCmd
    " Clear autocmds for this group
    autocmd!

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


    augroup end

    ReplyDelete