How to disable the ESC as a meta key in iterm2?

1.1k Views Asked by At

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

There are 1 best solutions below

2
On

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