DEV Community

Cover image for iTerm2 tricks you might not know 🤩
Shail Bhatt
Shail Bhatt

Posted on

iTerm2 tricks you might not know 🤩

What is iTerm2?
iTerm2 is a replacement for Terminal and the successor to iTerm. It works on Macs with macOS 10.12 or newer. iTerm2 brings the terminal into the modern age with features you never knew you always wanted.

Why do you need it?

  • If you spend a lot of time in a terminal, then you'll appreciate all the little things that add up to a lot. It is free software and you can find the source code on Github.

  • In most MacOS application you can hold ⌥ button and one of the arrow keys to jump words for faster navigation while editing large blocks of code.
    Unfortunately, iTerm2 does not have these shortcuts by default, so having to change an argument in a long command (or correct a typo) can be a case of pressing ← and waiting.

Easiest way to setup KeyBoard Shortcut.

preference -> profile -> keys -> Natural key Editing

Alt Text

List of Keyboard Combination Below.

Alt Text

Action KeyBoard Combination
Delete word ⌥ + delete
Delete line ⌘ + delete
Move cursor one word left ⌥ + ←
Move cursor one word right ⌥ + →
Move cursor to beginning of line ⌘ + ←
Move cursor to end of line ⌘ + →
Clear Screen ⌘ + k

Download: https://www.iterm2.com/

Latest comments (3)

Collapse
 
maxnderitu profile image
Maxwell Nderitu

Bless you I have been looking for this setting for a while

Collapse
 
dcblog profile image
David Carr

👍 One of the first apps I install on a new Mac it's essential. Also, go with ohmyz.sh/ for the bash has some great themes.

Collapse
 
jiayanguo profile image
jguo

Me too, i love it. Also, i like the embed password manager too. If you type password a lot in the shell.