vim - How to map a key in a command line argument inside a key mapping? -
the naive approach
nnoremap <leader>s :!echo "foo" <bar> vim -c="nnoremap x :q<cr>" -<cr>
displays errors. there way achieve this?
figured out. there 2 problems original code. first being equals sign after -c. other, solution use <lt>cr> instead of <cr>. entire command this:
nnoremap <leader>s :!echo "foo" <bar> vim -c "nnoremap x :q<lt>cr>" -<cr>
:help <lt>
Comments
Post a Comment