For example if I have some code like:
foo = bar(\"abc\", \"def\", true, callback);
Is there a nice command to move true to the 1st or 2nd posit
You need a transpose emacs command. But its limited to not guessing that its transposing in lists, it only considers text (it can't guess the 1st, 2nd word of list). Try this.
Keep your cursor at after comma of true. Use M-x transpose-words
. By default it will transpose with next word from the point. Shortcut is M-t
.
You can use C-u 2 M-t
for transpose with next second word.
Now coming to your question. If you want to move true,
to backward 1 word, use C-u -1 M-t
, and for backward 2 words C-u -2 M-t
.
Am not a VIM guy. So sorry bout that.