I find that the KEYTIMEOUT variable does not affect the ability of Vi mode in zsh to handle terminal escape sequences. The thing is that most terminal escape codes begin with escape, and the escape seems to be being slurped up by vim mode every time. Not sure how to make it work. In addition, I am not sure how to customize the bindings or behavior when INSIDE insert mode...

The main thing here is for example implementing an effective way to word hop without having to e.g. go to insert mode and use b and e.

I also want to point out that I'd be okay with changing it so that a key other than escape is used to exit insert mode here. As that would be yet another way to get around the escape character conflict. But, I don't know if this is possible either.

  • Use the viins keymap to map keys in insert mode. About your ESC issue, not sure what you mean. I don't have any problem with Home/End or arrow keys in insert mode myself. – Stéphane Chazelas Jun 25 '17 at 18:24
  • Yes, I have done some more looking and found the commands being issued by prezto editor module and this looks to be enough for me to troubleshoot my problems. – Steven Lu Jun 26 '17 at 19:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.