A VIM plugin to swap 2 arguments in a method call/definition.
Put cursor over the first argument, :ArgumentSwapperSwap
, done.
Map it to a leader shortcut, for example:
map <leader>as :ArgumentSwapperSwap<cr>
To make it easy to turn:
in_array($haystack, $needle);
into:
in_array($needle, $haystack);
Using vim-plug:
Plug 'robertbasic/vim-argument-swapper'
By default the plugin uses Python 3.
let g:argumentswapper_python_version = 2
in your .vimrc
file to use Python 2.