vim

vim rebinding key run slower than default key


<C-t> is :pop<CR> in my machine. When I bind it to <C-[> by nnoremap <C-[> <C-t> or nnoremap <C-t> :pop<CR>, when I use the new bound key, Ctrl+[, Vim runs much slower than when I use the default key, Ctrl+t. Is my method wrong?

How should i bind the key to make it run as normal speed?

I have comfirm it not a accident, and try it many times to ensure the new binding key run slower than default key.


Solution

  • <C-[> and <Esc> are essentially the same key for Vim, which plays a very important role. Case in point, Vim waits for a set time when you press the <Esc> key (or <C-[>) to decide whether <Esc> was part of something else or if you really meant to press <Esc>.

    Because it is such an important part of Vim I would advise against using <Esc> (or <C-[>) for a custom mapping.

    But you can still find a few suggestions under :help 'ttimeoutlen'.