Reputation:
This happens a lot to me.
foo =
bar
I want to easily move the content of the bar-line behind the equal sign. I know that I can do this if I am on the bar line:
^^dEk$p
but this feels clumsy, is there a shorter/more elegant way?
Upvotes: 11
Views: 7128
Reputation: 195059
say your cursor is on bar
line, you can do:
kgJ
to have:
foo = bar
Check help doc for J, gJ and :join
I also wrote a Join plugin, can do negative count (will work for your example), reverse join and lot more.
Upvotes: 30