Improved Terminal Experience with Oh My Zsh, iTerm2, PowerLevel10K

I have optimised my iTerm setup with a number of plugins to increase my productivity – Using powerlevel10k on iTerm2 with OhMyZsh with plugins. If you want to copy my config, checkout my dotfiles on Github – https://github.com/magicdude4eva/dotfiles:

iTerm with Powerlevel10K theme

Installing Homebrew

The most popular package manager for macOS is called Homebrew, or brew for short. We will use it to install the rest. First we need to install CLI tools for Xcode. Open a terminal and run this command:

xcode-select —-install

To install brew you simply open a terminal and paste this command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Installing iTerm2

You can download the app manually from the iTerm2 website or you can save yourself some trouble by using cask which helps you install apps from the command line. Open your terminal and write the following commands:

brew install cask
brew cask install iterm2

Customising iTerm

Installing Oh My Zsh

Install it by opening iTerm and write the command:

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Install Oh My Zsh plugins

zsh-autosuggestions is a great plugin that will suggest auto completions based on what you type.

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

zsh-completion aims at gathering/developing new completion scripts that are not available in Zsh yet

git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions

zsh-syntax-highlighting provides syntax highlighting for the shell zsh. It enables highlighting of commands whilst they are typed at a zsh prompt into an interactive terminal. This helps in reviewing commands before running them, particularly in catching syntax errors.

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

Next, edit your ~/.zshrc file to activate it. Add the plugins to the list of plugins:

plugins=(evalcache zsh-nvm osx git npm zsh-autosuggestions zsh-completions zsh-syntax-highlighting sublime)

Install PowerLevel10K

Powerlevel10k is a theme for Zsh. It emphasizes speed, flexibility and out-of-the-box experience.

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

Next, edit your ~/.zshrc file to activate it. Adjust the THEME-setting:

ZSH_THEME="powerlevel10k/powerlevel10k"

Open a new terminal tab and if the powerlevel10k setup does not start, run it manually:

p10k configure

Fuzzy find everything

fzf is a general-purpose command-line fuzzy finder. It’s an interactive Unix filter for command-line that can be used with any list; files, command history, processes, hostnames, bookmarks, git commits, etc. Activate it with CTRL+R:

Fuzzy Find everything

brew install fzf

Install the keybindings and completion

/usr/local/opt/fzf/install

Update your .zshrc:

[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

Forgit

forgit is an utility tool for using git interactively. This tool is designed to help you use git more efficiently. It’s lightweight and easy to use.

forgit - using git interactively

Install via Cloning into plugins:

git clone https://github.com/wfxr/forgit ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/forgit

Source via .zshrc:

[ -f ~/.oh-my-zsh/custom/plugins/forgit/forgit.plugin.zsh ] && source ~/.oh-my-zsh/custom/plugins/forgit/forgit.plugin.zsh

Delta – better git diffs

git-delta aims to make this both efficient and enjoyable: it allows you to make extensive changes to the layout and styling of diffs, as well as allowing you to stay arbitrarily close to the default git/diff output.

git-delta - command line diff tool

Install via brew:

brew install git-delta

Adjust your git global via git config --global -e:

...
[core]
    pager = delta

[interactive]
    diffFilter = delta --color-only	
[delta]
    features = side-by-side line-numbers decorations
    syntax-theme = Monokai Extended	
    line-numbers = true
    plus-color = "#012800"
    minus-color = "#340001"
    side-by-side = false
    whitespace-error-style = 22 reverse
[delta "decorations"]
    commit-decoration-style = bold yellow box ul
    file-style = bold yellow ul
    file-decoration-style = none
...

 


🍺 Pay it forward: If any of my content helped you in any way, then follow me on Twitter or send me some coins:
(CRO)    cro1w2kvwrzp23aq54n3amwav4yy4a9ahq2kz2wtmj (Memo: 644996249) or 0xb83c3Fe378F5224fAdD7a0f8a7dD33a6C96C422C (Cronos)
(USDC)   0xb83c3Fe378F5224fAdD7a0f8a7dD33a6C96C422C
(BTC)    3628nqihXvw2RXsKtTR36dN6WvYzaHyr52
(ETH)    0xb83c3Fe378F5224fAdD7a0f8a7dD33a6C96C422C
(BAT)    0xb83c3Fe378F5224fAdD7a0f8a7dD33a6C96C422C
(LTC)    MQxRAfhVU84KDVUqnZ5eV9MGyyaBEcQeDf
(Ripple) rKV8HEL3vLc6q9waTiJcewdRdSFyx67QFb (Tag: 1172047832)
(XLM)    GB67TJFJO3GUA432EJ4JTODHFYSBTM44P4XQCDOFTXJNNPV2UKUJYVBF (Memo ID: 1406379394)

🚀 Use my referral link https://crypto.com/app/ref6ayzqvp to sign up for Crypto.com and we both get $25 USD 😸
Free Crypto.com Visa Card! 100% rebate on Spotify, Netflix. Up to 8% cashback on all your shopping.
🧨 During signup use my referral code ref6ayzqvp to claim your reward 🧨
Go to Curve.com to add your Crypto.com card to ApplePay (get 1% cashback)