11

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
Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
  • 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 02 '11 at 01: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. –  Mar 26 '11 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? – Gilles 'SO- stop being evil' Mar 29 '11 at 19:48
  • 1
    If I were you, I would use tmux. – kzh Jun 28 '11 at 15:37
  • 1
    maptimeout 0 worked for me. – schmmd Jan 28 '14 at 23:36

2 Answers2

3

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.

sebasth
  • 14,872
  • 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 03 '20 at 06:48
1

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.

Katerberg
  • 111