Skip to content

Instantly share code, notes, and snippets.

@bmihelac
Created October 21, 2011 17:09
Show Gist options
  • Save bmihelac/1304343 to your computer and use it in GitHub Desktop.
Save bmihelac/1304343 to your computer and use it in GitHub Desktop.
swap 2 params in visual selection
" swap 2 params in visual selection
" ie: fun(a(), b()) => fun(b(), a())
:vnoremap <Leader>s :s/\%V\([^,]\+\)\(, *\)\(.*\%V.\)/\3\2\1<CR>gv<Esc>:noh<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment