iTerm2 — search keyword and copy and paste text
Command + F
to start search mode
iTerm2 search keywords from bottom to up.
Esc
to escape search mode
Searched keyword is keeping on selected.
Done 🎉
In the same way You can search keyword and start Copy Mode
Copy Mode - Documentation - iTerm2 - macOS Terminal Replacement
Command+Shift+C
to Start Copy Mode
Move cursor and change selected area
Max OS X High Sierra
iterm2 3.2.0
Note: You may have to go into Preferences (⌘,) -> Profiles -> Keys
and enable Left option (⌥) key acts as: +Esc
for the option commands to work.
Modifier
Symbol
Option
⌥
Command
⌘
Control
⌃
Caps Lock
⇪
Shift
⇧
Function
Shortcut
Previous Tab
⌘
+ Left Arrow
Next Tab
⌘
+ Right Arrow
Go to Tab
⌘
+ Number
Go to Window
⌘
+ Option
+ Number
Go to Split Pane by Direction
⌘
+ Option
+ Arrow
Go to Split Pane by Order of Use
⌘
+ ]
, ⌘
+ [
Split Window Horizontally (same profile)
⌘
+ D
Split Window Vertically (same profile)
⌘
+ d
Split Window Horizontally (new profile)
Option
+ ⌘
+ H
Split Window Vertically (new profile)
Option
+ ⌘
+ V
Set Mark
⌘
+ M
Jump to Mark
⌘
+ J
Function
Shortcut
Move back one character
Ctrl
+ b
Move forward one character
Ctrl
+ f
Delete current character
Ctrl
+ d
Delete previous character
Backspace
Undo
Ctrl
+ -
Function
Shortcut
Move to the start of line
Ctrl
+ a
Move to the end of line
Ctrl
+ e
Move forward a word
Option
+ f
Move backward a word
Option
+ b
Clear the screen
⌘
+ k
Function
Shortcut
Cut from cursor to the end of line
Ctrl
+ k
Cut from cursor to the end of word
Option
+ d
Cut from cursor to the start of word
Option
+ Backspace
Cut from cursor to previous whitespace
Ctrl
+ w
Paste the last cut text
Ctrl
+ w
Loop through and paste previously cut text
Option
+ y
Loop through and paste the last argument of previous commands
Option
+ .
Search the Command History
Function
Shortcut
Search as you type
Ctrl
+ r
and type the search term; Repeat Ctrl
+ r
to loop through result
Search the last remembered search term
Ctrl
+ r
twice
End the search at current history entry
Ctrl
+ y
Cancel the search and restore original line
Ctrl
+ g