Skip to content
Tom McDonald edited this page Dec 22, 2013 · 2 revisions

exchange.vim

This wiki will explain a few things about the plugin.

Troubleshooting

My custom mappings aren't working

A recent fix required changing the plugin mappings to avoid common prefix mappings. If you had previously defined a custom mapping like this

nmap cX <Plug>ExchangeLine

it should be changed to this

nmap cX <Plug>(ExchangeLine)

This goes for all mappings within exchange.vim. Simply add parentheses around the mapping name.

Visual mapping causes delay for change operator

As noted in Issue #11, the visual mapping for cx can cause a delay if you want to use c from visual mode. This is because Vim is waiting for a delay (specified by 'timeoutlen') before using the c command instead of using cx. For more details, see :help 'timeoutlen'.

There are two potential solutions for this.

Changing timeout length

Set 'timeoutlen' to a smaller value so that the delay is less noticeable.

set timeoutlen=250

Changing default visual mapping

Change the default visual mapping to something that doesn't begin with c (or any other existing operator).

vmap <Leader>cx <Plug>(Exchange)