8

Does anyone know what is the keyboard key to jump between word to word in embedded local terminal for WebStorm or PyCharm?

I have use Option (Alt) key + Arrow Left/Right to jump between word in Mac or mac terminal, but when I turn on embedded local terminal in WebStorm it just show [D or [C.

Searching lots online, cannot find a better solution but only find that may be the issue for WebStorm/PyCharm about meta key and Esc.

2
  • Ctrl + Arrow Left/Right works in the Python Console, but surprisingly doesn't work on the Terminal invoked with Alt + F12 (for anyone confusing the console with the terminal like I did)
    – nanotek
    Commented Jul 12, 2017 at 16:50
  • I have Mac so in Pycharm Python Console, it works to move switch between word by Option (Alt) key + Arrow Left/Right as well...but just not embedded terminal Commented Jul 12, 2017 at 17:23

1 Answer 1

6

I'm glad you brought this up because I've been wanting to fix the problem for a long time now but kept forgetting! The solution I came up with is manually adding the key binding directly to the .bash_profile. Here's a walk through:

Open .bash_profile using nano or whatever (editor you want to use) by running: nano ~/.bash_profile

Then paste where ever you want in the .bash_profile these commands: bind '"\e\e[C": forward-word' bind '"\e\e[D": backward-word'

Press ^x (that is the control key and the x key) > y > enter to save the .bash_profile changes.

Once that's finished, restart the terminal in WebStorm/PyCharm and enjoy!

Not the answer you're looking for? Browse other questions tagged or ask your own question.