-
Notifications
You must be signed in to change notification settings - Fork 184
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
With EditMode::Vi
, insert mode should not have keyseq_timeout
applied when receiving KeyPress::Esc
#416
Comments
See #371
|
@gwenn Maybe we could change the default value for vi mode timeout? There is not delay in zsh/bash vi mode. |
Are you sure ?
https://stackoverflow.com/questions/44890662/disable-timeout-on-esc-key
|
No, you are absolutely right. Tested some different delays for switching from insert mode to command mode with escape:
An important distinction is that bash seems to recognize command movement keys immediately after escape, eg:
Not sure how that's implemented |
Yeah @homburg, the fact that movement keys aren't recognized after escape is what surprised me. Maybe that is the solution. We could add key sequence rules for those combinations pretty easily, right? |
@bobbygebert Sounds like a good strategy, what do you think @gwenn ? For reference, I think this is relevant bash readline logic: https://git.savannah.gnu.org/cgit/readline.git/tree/readline.c#n901 but I'm not familiar enough with the code to understand it. |
I am not sure to understand:
Does it mean that movement keys are not recognized when timeout is too low ? |
@gwenn it means that bash recognizes the movement keys, eg. |
@homburg Ok, I understand now. We don't expect Meta-X in Vi mode only escape sequence. So Meta-X means Esc (exit insert mode) and do command associated to X. Looks good to me. We should be able to refactor/split |
6.3.0 released |
When in insert mode, you have to wait for 500ms (or whatever timeout was given in the editor config). I would expect hitting the escape key to return to command mode immediately.
The text was updated successfully, but these errors were encountered: