Take the 2-minute tour ×

I have Ctrl-Left and Ctrl-Right bound for vim, and would like to be able to use these shortcuts when vim runs inside screen.

However, because of Screen's input translation my key presses are mangled and vim does the wrong thing.

Trying to disable the key bindings with bindkey kr or bindkey -k kr while under screen does not work.

How do I keep my vim shortcuts while running it under screen?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

You need to set the $TERM variable to something that supports those keys. By default screen sets it to 'screen'. I have found setting it to 'xterm' does the trick. To achieve this you have two options.

Start screen like this: screen -T xterm, or put the following in your .screenrc.

term    xterm
share|improve this answer
Thankyou suvayu, that did the trick! –  brice Oct 28 '11 at 15:50
add comment

Your Answer


