Slight delay when switching modes in vim using tmux or screen

Posted by Ton van den Heuvel on Super User See other posts from Super User or by Ton van den Heuvel
Published on 2011-03-02T13:06:53Z Indexed on 2011/03/03 15:27 UTC
Read the original article Hit count: 410

Filed under:
|
|
|
|

Switching to and from insert mode in Vim is no longer instantaneous since I use tmux. After pressing Esc in insert mode, it takes a noticeable amount of time to actually get out of insert mode. After pressing Esc and any other key afterwards the switch is immediate, and the command for the key pressed after Esc is executed. Any idea what might cause this?

The Vim configuration is not the problem as the delay does not occur when I run Vim outside tmux, so this is probably related to tmux somehow. I use gnome-terminal btw.

Also worth noting, it seems I can not define key bindings in tmux for Esc, my plan was to bind Esc to:

bind Escape send-keys ^[

Alas, it seems binding anything to Esc for tmux does not work. The same problem occurs in screen as well.

© Super User or respective owner

Related posts about linux

Related posts about vim