Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When using vim under screen, some keys are not working.

Namely, Pressing Alt-Left produces '3D' and Alt-Right produces '3C'

Also, pressing Up/Down when scrolling list of files in Command-T plugin produces 'A' and 'B' respectively.

When I exit the screen and run vim just under ssh session, all works fine.

Are there any settings in screen itself or terminal server/client I can tweak to fix this issue?

share|improve this question
up vote 3 down vote accepted

Modify your .screenrc section

term xterm

Or modify your .vimrc:

if match($TERM, "screen")!=-1
  set term=xterm

For more information, see

share|improve this answer
Thanks heaps, that worked! – Art Feb 5 '11 at 14:59

Your Answer


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.