有些时候,这些快捷键可能被terminal窗口的菜单栏占用,
只需要Edit -> Keyboard Shortcuts... -> 把enable menu access 和 Enable the menu shortcuts key前面方框的勾去掉即可。
快捷键 | 功能 |
---|---|
Ctrl+A | 光标移动到行头 |
Ctrl+E | 光标移动到行尾 |
Alt+B | 光标向后(向左)移动一个word |
Alt+F | 光标向前(向右)移动一个word |
Ctrl+B | 光标向后(向左)移到一个字符 |
Ctrl+F | 光标向前(向右)移到一个字符 |
Alt+D | 删除光标后面的一个word |
Ctrl+D | 删除光标后面的一个字符 |
Ctrl-l | Clear the screen and move the cursor to the top left corner. The clear command does the same thing. |
Edit -> Preferences -> Advanced -> Shortcuts
勾选以下三项Disable:
格式 | 功能 |
---|---|
!$ | 用上一条命令的最后一个参数作为当前命令行 |
!!string | 将 string 添加到上一条命令的最后并执行 |
> echo haha haha > echo !$ haha > !!hello hahahello