In my current flow, I find that moving words is made slower by having to insert a whitespace, so I was wondering if there is a more efficient way
Here are two use cases:
how do I efficiently move a word at the end of a sentence, eg transform from the first line below to the second line , assuming, say, that the cursor is on 'A':
function Arg3 arg1 arg2
function arg1 arg2 Arg3
Currently I delete the word dw
, move to the end with A
, insert a space then do <C-o>p
, and press backspace to delete the unwanted additional space, and then finally <ESC>
how do I efficiently swap 2 words at in a sentence, eg transform from the first line below to the second line , assuming, say, that the cursor is on 'A':
function Arg2 arg1 arg3
function arg1 Arg2 arg3
Currently I delete the word dw
, move to the end with e
, do a<C-o>p
then <ESC>
I was wondering if there is a more efficient way of (1) moving a word at the end of a sentence and (2) swapping 2 words in a sentence, as what I do now seems a bit messy for vim