t_kB (shift tab) is not set when using st terminal

77 views
Skip to first unread message

phkbphkbphkb

unread,
Jun 4, 2018, 1:08:05 AM6/4/18
to v...@vim.org
Hi,

I'm not sure if it is a bug in vim, but Shift-Tab is not working on my
machine. For example, it clears the line in command mode instead of
getting back to the previous completion.

I solved the problem using the following workaround (from
http://vim.wikia.com/wiki/Make_Shift-Tab_work):

:exe 'set t_kB=' . nr2char(27) . '[Z'

So the problem is that t_kB is not set by default.

I think it is related to the terminal used, because t_kB is not set on
st (https://st.suckless.org/) but is set on tmux (which has a different
$TERM).

Best regards,
François-Xavier Carton

phkbphkbphkb

unread,
Jun 4, 2018, 1:08:05 AM6/4/18
to v...@vim.org

Christian Brabandt

unread,
Jun 4, 2018, 10:23:31 AM6/4/18
to v...@vim.org
And what is the value of $TERM and the option value of echo &term?

Best,
Christian
--
Stilblüten aus Schreiben von Versicherungsnehmern:
Ihre Argumente sind wirklich schwach. Für solche faulen Ausreden
müssen Sie sich einen Dümmeren suchen, aber den werden Sie kaum
finden.

phkbphkbphkb

unread,
Jun 4, 2018, 10:51:20 PM6/4/18
to v...@vim.org
Le 04/06/2018 à 16:23, Christian Brabandt a écrit :
>
> On Mo, 04 Jun 2018, phkbphkbphkb wrote:
>
>> Hi,
>>
>> I'm not sure if it is a bug in vim, but Shift-Tab is not working on my
>> machine. For example, it clears the line in command mode instead of getting
>> back to the previous completion.
>>
>> I solved the problem using the following workaround (from
>> http://vim.wikia.com/wiki/Make_Shift-Tab_work):
>>
>> :exe 'set t_kB=' . nr2char(27) . '[Z'
>>
>> So the problem is that t_kB is not set by default.
>>
>> I think it is related to the terminal used, because t_kB is not set on st
>> (https://st.suckless.org/) but is set on tmux (which has a different $TERM).
>
> And what is the value of $TERM and the option value of echo &term?
>
> Best,
> Christian
>

$TERM and echo &term are both st-256color.

Also I tested with "TERM=xterm vim" (but actually in st) and t_kB is
set. This confirms that the bug only happens with TERM=st-256color.

Best regards,
François-Xavier Carton

John Little

unread,
Jun 4, 2018, 11:54:36 PM6/4/18
to vim_use
On Monday, June 4, 2018 at 5:08:05 PM UTC+12, phkbphkbphkb wrote:
> ... t_kB is not set on
> st (https://st.suckless.org/)

I think it is. I downloaded the st-0.8.1.tar.gz from there, extracted st.info, ran
tic st.info
TERM=st-256color vim -c 'echo &t_kB'
and it shows ^[[Z. (I ignored the tic warnings about unknown capabilities.)

Maybe your OS-level terminfo is old, try the above.

phkbphkbphkb

unread,
Jun 5, 2018, 12:23:54 AM6/5/18
to vim...@googlegroups.com
You are right. t_kB is set after running the tic command. It is probably
a distribution bug, then.

Thanks!
François-Xavier Carton
Reply all
Reply to author
Forward
0 new messages