5

I have clean install of spacemacs. When I press escape to enter normal mode then immediately press u it will uppercase a word. If I wait a second, it will undo last action.

I'm assuming this is evil-mode or emacs key-chord feature in action. How can I change that behavior?

sevo
  • 4,559
  • 1
  • 15
  • 31
  • This might be more appropriate for http://emacs.stackexchange.com/ , the evil mailing list (implementations-list@lists.ourproject.org), or spacemacs bug tracker. Since this seems to be a spacemacs bug the bug tracker would be the best. – Gordon Gustafson Jun 04 '15 at 03:48
  • I'm trying to figure this out too. – Ho-Sheng Hsiao Jul 02 '15 at 17:13

2 Answers2

9

Spacemacs, particularly the develop branch should just work right out of box without the delay. However, I have found that this delay happens when I am running emacs inside of tmux. You should see if you are trying to run this inside tmux or screen, and if you are, see if this problem happens when you run emacs directly inside a terminal, without a terminal multiplexer.

If tmux is your problem, you can fix this with:

set -s escape-time 0

You'll have to find the equivalent in screen if that is what is happening.

See: https://bitbucket.org/lyro/evil/issue/69/delay-between-esc-or-c-and-modeswitch

Ho-Sheng Hsiao
  • 1,327
  • 12
  • 10
2

Zeroing out my delay as Ho-Sheng Hsiao suggested has served me well, but as Wesley Baugh pointed out, that has the consequence of preventing the use of ALT-key modifiers in your editors.

The Emacs-evil FAQ addresses the problem, but not very succinctly, and without a concrete recommendation.

The Neovim FAQ has a more succinct explanation, and a specific recommendation:

set-option -sg escape-time 10  # millisecond delay
billkw
  • 3,350
  • 3
  • 28
  • 32