Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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