Screen makes my ESC key wait for more commands I believe, and if it does not get those commands, it sends it to my terminal session (which I am running VIM in). ESC is used a lot in VIM and currently I do not make any use of the ESC key in Screen.

How would I go about changing the timeout?

I have read that these commands below inside of .screenrc should fix it, but it doesn't seem to be working for me:

maptimeout 0
defc1 off
  • 2
    FWIW I don't see any such delay when running vim under screen myself. I've got a more or less vanilla screen set up, subject to the defaults used in Ubuntu 10.10. ————— This sort of thing would happen if you've got a mapping set to Esc-something. Maybe scan through the output from :map to check that.
    – intuited
    Mar 2, 2011 at 1:14
  • When you do "ctrl-a i", do you see "-flow" or "+flow"? Or try running screen w/o your .screenrc to see if this still happens.
    – user2267
    Mar 26, 2011 at 15:40
  • 3
    maptimeout 0 alone should be enough. Do you also have a delay outside vim? Inside screen, is the delay the same duration as the maptimeout setting? Mar 29, 2011 at 19:48
  • 1
    If I were you, I would use tmux.
    – kzh
    Jun 28, 2011 at 15:37
  • 1
    maptimeout 0 worked for me.
    – schmmd
    Jan 28, 2014 at 23:36

2 Answers 2


Here is a post I found on VIM Wikia that shows how to fix most GNU screen/VIM integration problems.

Correct command is maptimeout 5

This may be necessary so Screen will wait no more than 5 milliseconds between characters when detecting an input sequence.

  • It might be helpful to note that this should go in ~/.screenrc or /etc/screenrc (for all users), and you should then restart your screen session.
    – Niek
    Jun 3, 2020 at 6:48

I would change the screen key binding away from esc to something like ctrl. I have not experienced anything like what you are describing with the default binding in .screenrc in AIX, Fedora, Debian, or Ubuntu.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.