In the command-line mode or in a vimscript I can use the following to duplicate a line:
Now let's says that I map my leader key to do that:
nnoremap <Leader>a Yp. If I use this key combination the following command will interpret litterally the characters or
How can I use a key combination including
<leader> in a normal command?
Note that other keys like
<F3> doesn't work neither.
Edit Some side notes:
normal!doesn't seem to change something to the problem
- The point of the question is to be able to use
<Leader>and not replace it by its value for two 2 reasons:
- It is more portable if I use it in a script and want to distribute it.
- My leader is
<Space>so even if I replace
<Leader>by its value I still have the same problem. (Note that I could maybe escape a space character but that is not the point of the question)
normal!. My leader is
\, and I can use
normal \ato execute the mapping, but I don't know how to keep it generic wrt leader.
<leader>by its value is not really what I'm looking for.