localcfg/plugins/vim_exchange.vimΒΆ

Enforce vim script implementation to reduce ambiguities and improve robustness:

scriptversion 4

Re-indent lines following exchange:

const g:exchange_indent = '=='

Add command to toggle indentation option for the current buffer:

command! ExchangeIndentToggle
\   let b:exchange_indent =
\       get(b:, "exchange_indent", g:exchange_indent) is v:true
\       ? '=='
\       : v:true

Tip

For parameter and argument reordering sideways.vim is often a better solution, as operations such as cxiwWcxiw and cxiw2bcxiw will only work in very simple cases.