shift-TAB in normal mode appears broken in terminal
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? --Leo
Am Sat, 21 Jan 2012 01:37:11 -0600 schrieb Leo Alekseyev <[email protected]>:
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. Frank
On Sat, Jan 21, 2012 at 2:54 AM, Frank Fischer <[email protected]> wrote:
Am Sat, 21 Jan 2012 01:37:11 -0600 schrieb Leo Alekseyev <[email protected]>:
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). --Leo
Am Sat, 21 Jan 2012 04:46:59 -0600 schrieb Leo Alekseyev <[email protected]>:
On Sat, Jan 21, 2012 at 2:54 AM, Frank Fischer <[email protected]> wrote:
Am Sat, 21 Jan 2012 01:37:11 -0600 schrieb Leo Alekseyev <[email protected]>:
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.
There's something strange going on. S-TAB correctly calls org-shifttab but this function sometimes simply does not what it should. But even If I call org-shifttab directly with "M-x org-shifttab" nothing happens, neither with evil nor without it. Perhaps org-mode does some keymap magic on its own that interferes with evil. I think it will take some time to figure out what's going on sorry. Frank
On Sat, Jan 21, 2012 at 01:45:41PM +0100, Frank Fischer wrote:
C-h k S-TAB now (correctly) shows <backtab> and its binding in org mode. However, it still doesn't work.
There's something strange going on. S-TAB correctly calls org-shifttab but this function sometimes simply does not what it should. But even If I call org-shifttab directly with "M-x org-shifttab" nothing happens, neither with evil nor without it. Perhaps org-mode does some keymap magic on its own that interferes with evil. I think it will take some time to figure out what's going on sorry.
Should be fixed in b6fd78a3 Btw: The issue with the TAB is the following. In terminal C-i and TAB are indistinguishable, i.e., both generate exactly the same key-code (number 8 IIRC) (in X they generate different key-codes). Unless you really need the usual Vim C-i command you can set `evil-want-C-i-jump' to nil (before loading evil or using the customization) which prevents the corresponding binding to be generated at all. Of course, just undefining that particular binding work as well and is perhaps more robust ;) Frank
participants (2)
-
Frank Fischer -
Leo Alekseyev