vim fu, swapping parameters for a method call

后端 未结 5 1145
礼貌的吻别
礼貌的吻别 2020-12-31 00:07

What is the most efficient way to swap two params for a method call in Vim?

For example, I want to change:

call \"hello mister 123\", 2343
<         


        
5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-31 00:33

    Check out sideways.vim, a plugin by @AndrewRadev. It can handle moving parameters and other delimited list items around, with some nice features like moving nested lists as a single unit. It handles Ruby-style method calls without parentheses as well. Very handy.

提交回复
热议问题