Viper ESC in terminal Emacs

Stephen Bach sjbach at
Sun Jul 11 19:33:18 CEST 2010


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?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : 

More information about the implementations-list mailing list