If Iopen (vanilla) vim by running $ vim [-u NONE],switch to insert mode by pressing a,add an 'a' by pressing a again,switch back to normal mode by pressing ESC, andrepeat steps 2 and 4 several times,I see my cursor switching from on top of the 'a' (normal mode) to after the 'a' (insert mode) and back instantly as I press the corresponding keys.If I now exit vim by typing :q! and confirming with RETURN/ENTER,start a (vannilla) screen session by running $ screen [-c /dev/null], andrepeat the above excercise,the switch from normal to insert mode after pressing a is still instantly but there is a notable delay between me pressing ESC and vim switching back to normal mode.I observed this with Screen version 4.01.00devel (GNU) and both, VIM - Vi IMproved 7.4 and NVIM 0.2.0-devHow can I configure [n]vim/screen to avoid this delay?
delay between hitting `ESC` (in insert mode) and switching to normal mode within `screen`
escape;gnu screen
I found the solution on http://vim.wikia.com/wiki/GNU_Screen_integration:Getting the Esc key to workIf you use Vim under Screen, you might find that the Esc key doesn't work.  To fix this, add the following to your .screenrc:> maptimeout 5This may be necessary so Screen will wait no more than 5 milliseconds between characters when detecting an input sequence.