System Administration & Network Administration
ssh terminal gnu-screen vim xterm
Updated Sun, 14 Aug 2022 14:26:11 GMT

Some keys not working under screen in vim


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?




Solution

Modify your .screenrc section

term xterm

Or modify your .vimrc:

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

For more information, see vim.wikia.com







External Links

External links referenced by this document: