如何在PhpStorm集成终端中逐字移动光标? [英] How to move cursor word by word in PhpStorm integrated terminal?
问题描述
我无法使用zsh快捷方式在PhpStorm集成终端窗口中通过⌥ →逐字移动插入符号,就像我在Mac上的终端应用程序中使用的那样.
I can't use my zsh shortcuts to move the caret by word in PhpStorm's integrated terminal window using i.e. ⌥ → like I use in Terminal App on my Mac.
我曾尝试使用zsh作为PhpStorm中的shell路径,但是我的默认zsh配色方案在PhpStorm内部显示得不好.似乎在PhpStorm终端中也未启用Mac Terminal->Settings
快捷方式.
I have tried to use zsh as shell path in PhpStorm but my default zsh color scheme is not showing well inside of PhpStorm. Seems that also Mac Terminal->Settings
shortcuts are not being enabled inside PhpStorm terminal.
推荐答案
我发现只有在将快捷方式直接绑定到我的~/.bash_profile
中并在底部添加该快捷方式时,它才能起作用:
I have found out that it work only if I bind the shortcuts directly in my ~/.bash_profile
, by adding this at the bottom:
bind '"[D": backward-word'
bind '"[C": forward-word'
进行这些更改后,关闭PhpStorm内的所有终端窗口,然后打开新窗口.
Close all terminal windows inside PhpStorm after making these changes and open the new one.
这篇关于如何在PhpStorm集成终端中逐字移动光标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!