CommandT slower with default shortcut

  1. anonymous

    Hi,

    I usually use the default shortcut <Leader>t for triggering commandT but I noticed if I set up my own in my .vimrc,the command is significantly quicker. Any reason for that?

    Cheers, Jeremy

  2. Greg Hurrell

    You've probably chosen a mapping that has a common prefix with another mapping, and Vim has to wait to disambiguate to see which one you mean.

    For example, if you have two mappings, <Leader>a and <Leader>ab, the first one will always have a noticeable delay, as Vim waits to see if you are going to type a b for a short delay, before finally assuming that you really did want the first mapping.

    To work around this, choose non-ambiguous mappings (eg. <Leader>a, <Leader>b), or mappings of the same length (ie. <Leader>ab and <Leader>ac won't have a delay), or adjust the 'ttimeoutlen' setting to reduce the amount of time that Vim will wait to disambiguate mappings (see the Vim help, :h 'ttimeoutlen').

  3. anonymous

    Thanks so much for explanation!

Reply

This topic is now closed.