在像Alt+d和Alt+f这样的迭代中敲击键盘快捷键。

时间:2021-04-07 17:25:32

Everyone at work recommended iTerm2 to me instead of the native Terminal. But iTerm2 doesn't seem to allow me to use bash shortcuts like Alt+B and Alt+F to jump back/forward between tokens, or Alt+D to delete a word.

工作中的每个人都向我推荐了iTerm2,而不是本地终端。但是,iTerm2似乎不允许我使用像Alt+B和Alt+F这样的bash快捷键在令牌之间来回跳转,或者Alt+D来删除一个单词。

I can't imagine this isn't available. Can anyone help me out?

我无法想象这是不可能的。有人能帮帮我吗?

1 个解决方案

#1


65  

The Option key (the Mac name for the Alt key) by default has other uses. Press Command+O to open the list of profiles, select Default (I assume that is the profile you are using), and click "Edit Profiles...". In the resulting window, click on the "Keys" tab, and select "+Esc" for one or both option keys. This should cause iTerm to treat the Option key the way you are accustomed.

缺省情况下,选项键(Alt键的Mac名称)有其他用途。按下命令+O打开配置文件列表,选择默认值(我假设这是您正在使用的配置文件),然后单击“编辑配置文件…”。在生成的窗口中,单击“Keys”选项卡,并选择“+Esc”作为一个或两个选项键。这将导致iTerm以您习惯的方式对待选项键。

Alternatively, you can simply use the Escape key instead.

或者,您也可以简单地使用Escape键。

#1


65  

The Option key (the Mac name for the Alt key) by default has other uses. Press Command+O to open the list of profiles, select Default (I assume that is the profile you are using), and click "Edit Profiles...". In the resulting window, click on the "Keys" tab, and select "+Esc" for one or both option keys. This should cause iTerm to treat the Option key the way you are accustomed.

缺省情况下,选项键(Alt键的Mac名称)有其他用途。按下命令+O打开配置文件列表,选择默认值(我假设这是您正在使用的配置文件),然后单击“编辑配置文件…”。在生成的窗口中,单击“Keys”选项卡,并选择“+Esc”作为一个或两个选项键。这将导致iTerm以您习惯的方式对待选项键。

Alternatively, you can simply use the Escape key instead.

或者,您也可以简单地使用Escape键。