A Beginner Tutorial To Set Up Terminal For Coding using iTerm2 and Oh My Zsh
My bare essential setup for improving developer productivity
·
-
Here's a quick post on the current terminal setup I've been using for the past 3 years to help a beginner out.
Terminal
I use iTerm2 which is a replacement of the stock terminal that comes in macOS. It has more features
than the stock terminal like hotkey window
which allows you to hit a hotkey to bring iTerm2 to the foreground when you're in another application.
I personally don't take full advantage of the additional features but still prefer iTerm2 more because of how it looks.
Note: To get the dark tabs click on iTerm2
in the toolbar -> click Settings
-> click Appearance
-> Set Theme
to Minimal
Oh My Zsh
Z shell (or zsh
) is a command line shell built on top of bash
and is the default used in macOS. In layman's terms, it's the
actual command line program the terminal is using to execute your commands.
I use the Oh My Zsh
framework which allows you to install plugins and themes to improve your terminal even more.
Here are the main plugins I use which you can use to help you get started.
Plugins
zsh-syntax
zsh-syntax-highlighting highlights syntax which makes it more readable.
z
z lets you jump to your most visited directories.
I use this all the time. For example, say I open up iTerm2 and want to navigate to the path
~/Library/Documents/Coding/my-project
.
Instead of manually navigating there with the command cd, I can simply type in
z my-project
to take me there.
zsh-history-substring-search
zsh-history-substring-search allows you to type in any part of any command you've written in the past and it'll provide these past commands as suggestions which you can cycle through using the UP and DOWN arrows.
zsh-autosuggestions
zsh-autosuggestions provides auto-completion of a command you're typing based on what you've written in the past. Pairing this with
zsh-history-substring-search
makes it a breeze to repeat commands.
Themes
I picked Powerlevel10k because I saw it recommended a lot and have stuck with it. I really like the customisability it provides during the setup.
However, the colour scheme isn't the most exciting so that could be a deal-breaker for you.