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

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -