[ACCEPTED]-Apply vimrc changes without restarting-vim

Accepted answer
Score: 38

You can just source it, like this:

:so ~/.vimrc

Also, for 3 convenience, it usually gets mapped to something 2 quicker to type:

nmap <silent> <leader>sv :so $MYVIMRC<CR>

And then of course, it would 1 be nice to open vimrc a little quicker:

nmap <silent> <leader>ev :e $MYVIMRC<CR>
Score: 15

You can automate this by creating an autocmd 2 that sources the .vimrc file every time 1 it is saved:

autocmd BufWritePost .vimrc so %
Score: 5

If you are editing it,just type:

:so %

0

More Related questions