A Vim plugin to swap 2 arguments in a method call/definition.
Python Vim script
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
autoload
lib/argumentswapper
plugin
.gitignore
LICENSE
README.md

README.md

vim-argument-swapper

A VIM plugin to swap 2 arguments in a method call/definition.

Usage

Put cursor over the first argument, :ArgumentSwapperSwap, done.

Map it to a leader shortcut, for example:

map <leader>as :ArgumentSwapperSwap<cr>

Why?

To make it easy to turn:

in_array($haystack, $needle);

into:

in_array($needle, $haystack);

Installation

Using vim-plug:

Plug 'robertbasic/vim-argument-swapper'

Configuration

By default the plugin uses Python 3.

let g:argumentswapper_python_version = 2 in your .vimrc file to use Python 2.