Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timeout setting for a delay to exit from INSERT mode to NORMAL mode in vim keybinding environment #15027

Closed
chris-aeviator opened this issue Aug 31, 2021 · 6 comments

Comments

@chris-aeviator
Copy link

chris-aeviator commented Aug 31, 2021

When using dotspacemacs-editing-style 'vim I notice a delay when going from (vim) INSERT to (vim) NORMAL mode via hitting the ESC key.

This delay basically leads to a lot of errors. As a vim user I'm accustomed to apply very fast (muscle memory style) commands. When hitting keys inside the approx. .75 second delay spacemacs takes to go from INSERT to NORMAL they are interpreted as emacs/spacemacs commands.

Example

A combination of ESC j in vim INSERT mode would put my cursor down one line. With the delay described here it will rather move my line and for example mess up my .org list. Even worse, undo (U) will not undo that move. I have therefore messed up already alot of things in my files, like headlines being full uppercase (guess ESC U)

Solution

I suggest to make the timeout configurable, if it is already please point to the docs.

@lebensterben
Copy link
Contributor

looks duplicate #5413
please try the workaround there

@chris-aeviator
Copy link
Author

thanks for pointing out, at first glance the workaround seems to be targeted to OSX while I'm running on arch linux :-/

@chris-aeviator
Copy link
Author

I realized that everytime I exit I mode, spacemacs saves my file. I'm running this on a M.2 SSD / PCIe NVMe so write time could not possibly be an issue here, but could other processes/ hooks be taking place and slowing things down?

@lebensterben
Copy link
Contributor

#5413 (comment)

@chris-aeviator
Copy link
Author

#5413 (comment)

❤️

@chris-aeviator
Copy link
Author

I didnt realize this since I'm only sometimes in Tmux but my standard shell is zsh which has also it's own escape time setting

zsh

# 10ms
KEYTIMEOUT=1

tmux

set -s escape-time 0

(https://www.johnhawthorn.com/2012/09/vi-escape-delays/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants