GNU screen seems to catch the Shift-Tab key combination which is mighty unfortunate as i'm using this combination in vim. Has anyone noticed such behaviour? How can i change it?

link|improve this question
1  
Perhaps you should show your ~/.screenrc and ~/.vimrc. – Dennis Williamson Oct 4 '10 at 21:00
What happens when you press Ctrl+V Shift+Tab in insert mode 1: outside and 2: inside screen? – Gilles Oct 4 '10 at 22:23
@Gilles: i get ^[[Z] in both cases, to be more specific, it's the minibufexpl vim plugin that doesn't seem to react to the Shift-tab within screen the way it does when i'm not running screen (the key combination moves the cursor to the previous buffer label) – Julius Oct 5 '10 at 13:59
@Dennis: i removed both of them (and my .vim folder, except .vim/plugin/minibufexpl.vim) to isolate the issue – Julius Oct 5 '10 at 14:05
feedback

1 Answer

up vote 1 down vote accepted

Add this line to your ~/.vimrc file:

set t_kB=^[[Z

To insert the ^[ (escape character) press Ctrl-v then Esc (don't type literal carat-leftbracket).

It's already set in the terminfo file for xterm, but not in the ones for screen.

Alternatively, you can simply set TERM=xterm in the shell.

You can try these at a shell prompt to see the difference:

infocmp -I xterm | grep cbt
infocmp -I screen | grep cbt

The terminfo capabilities cbt and kcbt correspond to the termcap capabilities bt and kB respectively.

link|improve this answer
I have also found this vim wiki link useful (vim.wikia.com/wiki/GNU_Screen_integration) for fixing the home/end/del keys – Julius Oct 8 '10 at 6:19
feedback

Your Answer

 
or
required, but never shown

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