1
I would like to have a shortcut in vim that performs a line duplication, without messing up the cursor's position. Simply yanking and pasting always moves the cursor to the beginning of the next line, so I think I need to do this in two steps: copying the beginning of the line and then the end of the line. What I was trying is this:
noremap <C-S-d> y0O<ESC>pkéy$lgp`[
with hjkl
remapped to jklé
. (without remapping it would look like this: y0O<ESC>pjly$kgp`[
.)
This does not seem to work as a command though, even though when I test it key by key, it mangaes just fine. I wonder what is wrong with this macro?