shift-TAB in normal mode appears broken in terminal

Leo Alekseyev dnquark at
Sat Jan 21 11:46:59 CET 2012

On Sat, Jan 21, 2012 at 2:54 AM, Frank Fischer
<frank.fischer at> wrote:
> Am Sat, 21 Jan 2012 01:37:11 -0600
> schrieb Leo Alekseyev <dnquark at>:
>> I've been having trouble with TAB and shift-TAB keys when running Evil
>> in a terminal.  I use these for org-outline-cycling, and given the
>> amount of time I spend in org-mode, they are important to me.  I
>> undefined the TAB key using Frank's recipe from a couple of weeks ago,
>> but I can't figure out what's going on with shift-TAB in normal mode.
>> C-h k reports it as ESC, but IIRC it's a known bug.  Can anyone shed
>> light on the issue?
> If you use the latest version C-h k should do the right thing, even in
> terminal mode. Furthermore I can't reproduce the error, but be aware of
> different terminal type. For example, in my xterm which is set to
> "xterm-256color":
> $ echo $TERM
> xterm-256color
> and the "make terminal" in evil's source directory, C-h k TAB shows
> "TAB runs the command evil-jump-forward ..."
> and C-h k shift-TAB shows the message "<backtab> is undefined", i.e. no
> ESC key but not bound to some command. On the other hand if I do the
> same in the console
> $ echo $TERM
> TERM=linux
> shift-TAB shows exactly the same as TAB, i.e. the shift key does not
> make any difference and is not recognized by Emacs. Therefore please
> tell us the Emacs version, evil version AND the OS and terminal you
> use, also if you use terminal multiplexers like tmux or screen, they
> all can make a difference.

I am running under screen; latest evil pull, org-mode pull that's less
than 24 hours old, and emacs 24.0.92.

C-h k S-TAB now (correctly) shows <backtab> and its binding in org
mode.  However, it still doesn't work.

Please note: it only doesn't work in evil normal mode; it functions as
expected when I switch to emacs mode with C-z.  This is why suspect
Evil is doing something strange :)  You can reproduce it with any org
file, e.g.

* foo
** bar

This outline only cycles for me properly in emacs mode.  When I go
into any of the evil modes, when I press S-TAB once, the outline
folds, but when I keep pressing S-TAB the outline remains folded
(instead, it should cycle through folding states).


More information about the implementations-list mailing list