In Vim, I set a mapping to move a line up with each press of _
nnoremap _ ddkP
In my experiments, when I reach the top of my Vim file, all the lines get eaten up if I continue to press and hold _
Is something wrong? I’m on the Mac, but using the console Vim, not MacVim.
Kristo’s explanation looks logical to me.
I suggest that you try this mapping instead, which does a
:movewithout deleting any lines:You can also undo this atomically.