I'm on OSX, and for some reason, when I do command - ← (back arrow) in the PhpStorm terminal I get a [D
, while command - → (forward arrow) outputs a [C
. What I want to do is jump forward and back one word.
In my OSX terminal these keypresses work as expected, and I can't find anywhere where they are set to output those characters. Does anyone have the answer to this conundrum?
Turns out that an answer for the same problem on iTerm also works for PhpStorm! The fix involves creating a new file named ~/.inputrc
and then put the following code in it:
"\e\e[D": backward-word
"\e\e[C": forward-word
Here is the original link