The label

Create a new label: Command + t

Close the tag: Command + w

Switch labels: Command + digit Command + left and right arrow keys

Switch to full screen: Command + Enter

Find: command + f

Split screen

Vertical split screen: Command + D

Horizontal split screen: Command + Shift + D

Switch screen: Command + option + arrow keys Command + [or Command +]

To view the history command: command +;

View the clipboard history: Command + shift + h

other

Clear the current line: CTRL + U

To the beginning of the line: CTRL + A

End of line: CTRL + E

Forward and Backward: CTRL + F/B (equivalent to left and right arrow keys)

Previous command: CTRL + P

Search command history: CTRL + R

Delete the current cursor character: CTRL + D

Delete the character before cursor: CTRL + H

Delete word before cursor: CTRL + W

Delete to the end of the text: CTRL + K

Swap text at the cursor: CTRL + T

Clear screen 1: Command + r

Clear screen 2: CTRL + L

Come with what very useful function/shortcut key

⌘ + numbers toggle directly to and fro between TAB tags

Select copy + middle mouse button paste, this is very practical

⌘ + f searches will be automatically copied

⌘ + D horizontal split / ⌘ + shift + D vertical split

⌘ + r = clear and just move to a new screen. ⌘ will not create an empty screen like clear

CTRL + U clears the current line, no matter where the cursor is

Press ⌘ + after entering the lead command; The entered commands are automatically listed

⌘ + Shift + H will list the clipboard history

Iterm can be called up by setting global shortcuts in Preferences > keys, which can also be implemented using Alfred

Common shortcuts

⌘ + 1/2 to and fro between the left and right TAB, which was introduced earlier

⌘← / ⌘→ To the left/right of a command. This function is the same as C+ A/C+ E

⌥← / ⌥→ Move forward/backward by word, similar to C+ F/C+b. In fact, this function is already predefined in Iterm, ⌥f / ⌥b, depending on personal habits

I think these are the only ones

The setting method is as follows

Of course these can be customized and don’t forget the useful combinations in Linux

C+a/C+e this works almost anywhere, right

C+p / !! Previous command

Delete C+k from the cursor to the end of the command line.

C+w A+d Deletes from the cursor to the beginning/end of the word

C+h C+d Delete the ego before and after the cursor

Paste C+y after the cursor

C+r search command history, this is more commonly used

Copy as you go

Iterm2 has two handy select-and-copy modes.

One is to use the mouse, select a path or a word in Iterm2, and iterm2 will copy itself. The other is mouseless mode, command+ F, pop up the search mode of iterm2, enter the first few letters of the content to find and copy, confirm to find their own content, enter TAB, the search window will automatically change the content, and copy it. If you type Shift + TAB, the left side of what you’re looking for is automatically selected and copied.

Autocomplete typing the first few letters, then enter Command +; Iterm2 will automatically list similar commands previously entered.

Shear history

Enter command+ Shift +h and iterm2 will automatically list the clipboard history. To Save the clipboard history to a disk, choose Preferences > General > Save Copy /paste History to Disk.

About

Personal website: 👉 microzz.com/

Making: 👉 github.com/microzz