views:

71

answers:

1

Hey all, I'm a long-time vim user trying to make the switch to emacs.

I'm using viper-mode in emacs and I keep typing ESC (to get out of insert mode) and then a key (say, j). I type fast and often hit them at the same time. Emacs then thinks I'm hitting META-j and runs a function which I do not intend.

I like using option as meta and don't care to have ESC ever be meta when I'm in viper.

Anyone have suggestions on how to completely disable ESC as meta in viper mode?

Here's a few related options that I've tried. None of these solve the issue.

(setq viper-no-multiple-ESC t)                                                                                   
(setq viper-translate-all-ESC-keysequences t)                                                                        
(setq viper-fast-keyseq-timeout 0)
+1  A: 

I was in the same boat, and this problem has been preventing me from trying emacs for quite a while. But I finally had some time to investigate, and think I've got a solution/workaround.

After looking at viper's source, I realised that contary to all the documentation I find, viper-translate-all-ESC-keysequences is a function. So setting a variable with the same name won't do anything.

So now I have (defun viper-translate-all-ESC-keysequences () nil) after my (require 'vimpulse) line in my .emacs file. And it seems I can spam my ESC key as much as I want now. Why the documentation was so misleading I don't know, but for now I at least get to try emacs with this workaround. Hope this helps!

Gene Auyeung