iTerm2 Shortcut Key Daquan

Article directory

Label

新建标签:command + t

关闭标签:command + w

切换标签:command + 数字 command + 左右方向键

切换全屏:command + enter

查找:command + f

Split Screen

垂直分屏:command + d

水平分屏:command + shift + d

切换屏幕:command + option + 方向键 command + [ 或 command + ]

查看历史命令:command + ;

查看剪贴板历史:command + shift + h

other

清除当前行:ctrl + u

到行首:ctrl + a

到行尾:ctrl + e

前进后退:ctrl + f/b (相当于左右方向键)

上一条命令:ctrl + p

搜索命令历史:ctrl + r

删除当前光标的字符:ctrl + d

删除光标之前的字符:ctrl + h

删除光标之前的单词:ctrl + w

删除到文本末尾:ctrl + k

交换光标处文本:ctrl + t

清屏1:command + r

清屏2:ctrl + l

自带有哪些很实用的功能/快捷键
+ 数字在各 tab 标签直接来回切换

选择即复制 + 鼠标中键粘贴,这个很实用
+ f 所查找的内容会被自动复制
+ d 横着分屏 /+ shift + d 竖着分屏
+ r = clear,而且只是换到新一屏,不会想 clear 一样创建一个空屏

ctrl + u 清空当前行,无论光标在什么位置

输入开头命令后 按 ⌘ + ; 会自动列出输入过的命令
+ shift + h 会列出剪切板历史

可以在 Preferences > keys 设置全局快捷键调出 iterm,这个也可以用过 Alfred 实现```

## 快捷键

```php+ 1 / 2 左右 tab 之间来回切换,这个在 前面 已经介绍过了

⌘← / ⌘→ 到一行命令最左边/最右边 ,这个功能同 C+a / C+e

⌥← / ⌥→ 按单词前移/后移,相当与 C+f / C+b,其实这个功能在Iterm中已经预定义好了,⌥f / ⌥b,看个人习惯了

好像就这几个

设置方法如下

当然除了这些可以自定义的也不能忘了 linux 下那些好用的组合

C+a / C+e 这个几乎在哪都可以使用

C+p / !! 上一条命令

C+k 从光标处删至命令行尾 (本来 C+u 是删至命令行首,但iterm中是删掉整行)

C+w A+d 从光标处删至字首/

C+h C+d 删掉光标前后的自负

C+y 粘贴至光标后

C+r 搜索命令历史,这个较常用
  • Select and copy
    1, iterm2 There are 2 easy-to-use select and copy modes.
    One is to use the mouse to select a certain path or a certain word in iterm2, then iterm2 will be copied automatically.   
    2. The other is the mouseless mode, command+f, the search mode of iterm2 pops up, enter the first few letters of the content to be searched and copied, and after confirming that the content found is your own, enter tab, and the search window will change automatically content and copy it. If the input is shift+tab, the left side of the search content will be automatically selected and copied.
    3. Auto-completion
    Enter the first few letters, and then enter command+; iterm2 will automatically list similar commands entered before.

  • Cut history
    Enter command+shift+h, iterm2 will automatically list the history of the clipboard. If you need to save the clipboard history to disk, set it in Preferences > General > Save copy/paste history to disk.

Guess you like

Origin blog.csdn.net/lxy4239/article/details/120158151