Use ZSH and Oh My ZSH

When you start a terminal application, by default it is running a shell called Bash. It's the most popular shell, but there are alternatives that make using the terminal faster and
more comfortable for developers.

Open links from terminal

Hold Cmd key while clicking on the link in the terminal. It's really useful when the output of the command is referring to some external resource.

Different working directories

By default, splitting current screen in iTerm2 gives me new split screen in default location (which is user’s home directory) not in my current location. If you want to have split screen of the current location you are working in go to Profiles → Working Directory -> Advanced Configuration.

Change settings for working directories

Map keys to jump between words

If you have experienced typing very long command and you want to fix a typo in the middle, there are not that many choices but to keep pressing left arrow key until the cursor reaches where typo happens.

You can jump between words by sending some special characters in shell and iTerm2 can make it easier. You can go to: Keys → Key Mappings and add key mappings you want.

Setup all the following keys accordingly

Keys

Action

Value

Purpose

Cmd ←

“Send Hex Code”

0x01

Jump to beginning of the line

Cmd ➝

“Send Hex Code”

0x05

Jump to end of the line

Cmd Backspace

“Send Hex Code”

0x15

Delete current line

Alt ←

“Send Escape Sequence”

b

Jump to beginning of the word

Alt ➝

“Send Escape Sequence”

f

Jump to end of the word

Alt Backspace

“Send Hex Code”

0x17

Delete word

Non-native fullscreen mode

It's quite controversial step, but it works perfectly for me.

iTerm offers the option to disable “native full screen mode.” This makes it easy to switch back-and-forth between an editor and shell. How? Rather than opening a native full-screen app with the accompanying slow animation, iTerm instantly places a terminal over the desktop.

Under the “General” tab uncheck “Native full screen windows.”Change styles to “Fullscreen” and adjust transparency and blurEnable the system-wide hotkey for showing/hiding the app.

Add Plugins and Aliases

Add your custom aliases and plugins to ~/.zshrc. I use the following things: