Viper ESC in terminal Emacs
Hi, Has anyone on this list managed to get a zero-delay viper ESC working in terminal Emacs? Works fine for me in a windowing system; ESC promptly switches from insert mode to normal mode. But from a terminal there is a highly annoying ~1 second delay after pressing ESC. In GNU Emacs 22 I believe I was able to solve this with: (setq-default viper-ESC-keyseq-timeout 0) This doesn't hold for Emacs 23. Notably, viper-ESC-keyseq-timeout has changed from a variable to a function in more recent versions of Viper. But even the following doesn't help: (defadvice viper-ESC-keyseq-timeout (around fix-viper-terminal-ESC activate) (setq ad-return-value 0)) My investigation seems to show that the delay happens before the toplevel viper-intercept-ESC-key is even called... ESC is a prefix key in non-Viper Emacs, so that could be the culprit, but ostensibly its status as a prefix key is shadowed by enabling Viper. Any ideas? Thanks, Stephen
On Sun, Jul 11, 2010 at 08:52:34PM +0200, Vegard Øye wrote:
On 2010-07-11 19:33, Stephen Bach wrote:
Any ideas?
Have you tried (setq viper-fast-keyseq-timeout 0)?
Looks like that does work! I hadn't even tried that because of the variable's description, which implies it also affects standard vi key sequences, e.g. "2cw". Thanks Vegard.
On Sun, Jul 11, 2010 at 04:07:25PM -0400, Stephen Bach wrote:
On Sun, Jul 11, 2010 at 08:52:34PM +0200, Vegard Øye wrote:
On 2010-07-11 19:33, Stephen Bach wrote:
Any ideas?
Have you tried (setq viper-fast-keyseq-timeout 0)?
Looks like that does work! I hadn't even tried that because of the variable's description, which implies it also affects standard vi key sequences, e.g. "2cw". Thanks Vegard.
For posterity: the other half of this problem was GNU screen. If you want to use Emacs + viper/vimpulse within screen, set the maptimeout config variable to 0 (from 300ms, the default).
participants (2)
-
Stephen Bach -
Vegard Øye