I occasionally find that while working in iTerm the default Readline key bindings are replaced with the vi
keybindings.
For example, I will try to go to the beginning of the line with ctrl–a, and instead it will print the character ^A
, and then I won't be able to insert any text until I enter insert mode. I know this can be configured by setting the editing-mode in my inputrc file, but I don’t have that set in mine. Is there a way that I could be dynamically entering vi
mode?
Best Answer
I believe this issue is related to the way the Mac OS X terminal handles terminal emulation and even color coding—which is related to control sequences—as explained in this blog post:
Fair warning, some of the advice in that comment thread is out of date since there no longer is a
xterm-color
in the terminal as of Mac OS X 10.8 (Mountain Lion). But I believe adjusting items in the “Advanced” tab (pictured) might help: