0
votes

I'm using vim mode on bash terminal and when I press ESC terminal should change from INSERT mode to NORMAL. The problem is that ESC is a meta key and terminal waits half a second to change the mode. Is there a way to disable the meta key or reduce timeout in bash prompt?

This is not a duplicate of Making iTerm to translate 'meta-key' in the same way as in other OSes as I am not interested in remapping Option to act as ESC, I want to disable the ESC to work as a meta.

1
You mention byobu; it's not iTerm2 that's waiting for additional input, but tmux (or whatever terminal multiplexer byobu is using).chepner
After disabling byobu the problem still persists. I think bash is waiting for the ESC-b or ESC-f sequence to move one word back or forward.Zhorzh Alexandr

1 Answers

2
votes

When you press Esc, bash waits for 500 milliseconds to see if you want just an escape key, or if you want another Readline command that starts with an Esc. You can decrease the timeout from .inputrc with

set keyseq-timeout 250