Run vimscript, run!
:h :@
This is the command every Vim plugin developer should be aware of. I wish I knew about it earlier.
" eval selected vimscript vmap <Leader>r "vy:@v<CR> " eval vimscript line nmap <Leader>r "vyy:@v<CR>
Now with this screwdriver in my hands I can tinker at variables and functions of my plugin/script/colorscheme easily. That’s convenient.
The only drawback is that it can’t eval vimscript’s longlines. Those with `\` in the beginning:
" remove trailing spaces
map <F4> m`:silent! %s/\(\s\+$\)\\|\(\r$\)//g<CR>``
\:echo "Remove trailing spaces and ^Ms ..."<CR>
