I've seen dozens of articles that talk about making terminal life better by switching to iTerm2 and then turning on "Natural Text Editing" under Profile > Keys. Then you can use the normal option
+left/right to move between words.
I have tried that, and it works.. One time. I can jump back exactly one word, and then I just get a bell any time I try moving left or right with option
. If I hit enter, the command works as expected. And at the next prompt I'm allowed to cursor over one word and then it stops again.
I have tried the same in the default Terminal app and get the same results. I can move one word, and then bells.
In playing around with the keys, after option
+left arrow
the one time, I can still move around normally with the left and right cursor arrows. But I seem to be in some weird vim-like shortcut mode as hitting b
moves me back and w
moves me forward. Typing v
puts me in a vim-like editor (:q
to get back to the command prompt.
This is on a brand new M1 Macbook Pro, v12.1, using bash if it makes a difference.