:3m .
moves line 3 to your current line.
In Vim, can I move a line to current line without leaving the current line?
Question
The title says it all: is there a way in Vi(m) to move a line, by number, to my current line?
I could move to my source line first, then use the :m
command to move that line. But that involves leaving my target line. Or, I could :Nd
, but that also moves me off of my current line and on to the deleted line number N
.
It's frustrating looking at a line and thinking "move here" and not knowing how :D.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow