selects around current element, moves to the next, visually swaps, moves cursor to the beginning of selection and exists visual mode. this way it works on the edges of a form
I don't seem to have such visual mode mappings by default, but this seems to do the trick
tpope/vim-sexp-mappings-for-regular-people
<e
and>e
moving elements aroundIs there a way to move hash-map key value pairs together?
hack - move each element of pair one at a time does not work if you try to move on the edge of the
sexp supports moving around visually selected pairs. I've created a PR for missing mapping https://github.com/tpope/vim-sexp-mappings-for-regular-people/pull/12 . If you have the mapping from the PR than swapping pairs is
selects around current element, moves to the next, visually swaps, moves cursor to the beginning of selection and exists visual mode. this way it works on the edges of a form
I don't seem to have such visual mode mappings by default, but this seems to do the trick