I’ve been using iTerm 2 for quite some time without taking full advantage of it. After searching for a little while I discovered a few tips that I’d like to share.
This isn’t — by any means — a definitive list of tips and tricks for iTerm 2, only what I use the most in my workflow.
⌘ = Command, Cmd, Clover, (formerly) Apple
⌃ = Control, Ctl, Ctrl
⌥ = Option, Opt, Alt
⌫ = Delete, Backspace
← = Left Arrow
→ = Right Arrow
1. Move the cursor to the beginning of the line:
fn + ← or
⌃ + A
2. Move the cursor to the end of the line:
fn + → or
⌃ + E
3. Removing the entire line:
⌃ + U
4. Redo line removal:
⌃ + Y
5. Transform word to uppercase (I don’t use this one often):
⌥ + U
6. Delete one word:
⌥ + ⌫
Now, before having a shortcut to move one word left (
⌥ + ←) and one word right
⌥ + →) you need to do the following:
- Go to: iTerm / Preferences / Profile / Keys
⌥ + ←in Profile Shortcut Key and double-click.
- Change its settings to Action: Send Escape Sequence, Esc+: b — do the same for
⌥ + →but in Esc+‘s field put “f” instead of “b” (sans quotes).
- Left option (⌥) key acts as: select Esc+