Is there a good Vi(m) command for transposing arguments in a function call? Bonus points for Emacs

前端 未结 5 1133
北荒
北荒 2021-02-14 05:09

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

5条回答
  •  感情败类
    2021-02-14 05:14

    If you want to do this as a refactoring, not just as text manipulation, I'd suggest looking into Xrefactory, a refactoring tool for Emacsen (free for C/Java, commercial for C++).

提交回复
热议问题