Last Updated: February 25, 2016
·
461
· kablamo

Execute a line from your .vimrc

I use this when I'm editing my .vimrc. I've made some change and want to start using it but don't want to restart vim or re-source my entire .vimrc.

map <leader>vv yy:<c-r>"<bs><cr>

Just put your cursor somewhere in your .vimrc and type <leader>vv and it will execute that line of viml.

2 Responses
Add your response

You can use @" instead of <C-r>" like this:

map <leader>vv yy:@"<cr>
over 1 year ago ·

Thanks! That does work.

over 1 year ago ·