UncategorizediTerm2 + Oh My Zsh + Solarized color scheme...

iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] – (macOS)


- Advertisment -

How to install


brew install --cask iterm2

Or, if you do not have homebrew (you should ;)): Download and install iTerm2

iTerm2 has better color fidelity than the built in Terminal, so your themes will look better.

Get the iTerm color settings

Just save it somewhere and open the file(s). The color settings will be imported into iTerm2. Apply them in iTerm through iTerm → preferences → profiles → colors → load presets. You can create a different profile other than Default if you wish to do so.

Oh My Zsh

More info here: https://github.com/robbyrussell/oh-my-zsh

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

When the installation is done, edit ~/.zshrc and set ZSH_THEME="agnoster" for the default look. Or better yet, go for Powerlevel10k.

Powerlevel9k / Powerlevel10k

Why Powerlevel10k? Well, because it’s a drop-in replacement for Powerlevel9k, just a lot faster to render your prompt. ls feels fast again!

So if you prefer the Powerlevel10k look with added info such as exit codes and timestamps on the right, run:

git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k

Then edit your ~/.zshrc and set ZSH_THEME="powerlevel10k/powerlevel10k". Once you do so, when you start a new terminal session, the Powerlevel10 configure wizard will be launched to set your prompt, beware, there are many many options!

Powerlevel10k offers a whole lot more and is extremely configurable, best is to check its project page.

If you want to trigger the configuration wizard immediately, simply run p10k configure to discover all options, which are plentiful.

Install a patched font

If you did not go with Powerlevel10k or you want another font, read on:

Open the downloaded font and press “Install Font”.

Set this font in iTerm2 (iTerm → Preferences → Profiles → Text → Font), in the dropdown select the desired Font. You will see it change on the fly.

Restart iTerm2 for all changes to take effect.

Further tweaking

Things like

  • auto suggestions
  • word jumping with arrow keys / natural text editing
  • syntax highlighting
  • visual studio code config

can be found in the section below.

Auto suggestions (for Oh My Zsh)

Auto suggestions

Just follow these steps: https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md#oh-my-zsh

If the auto suggestions do not appear to show, it could be a problem with your color scheme. Under “iTerm → Preferences → Profiles → Colors tab”, check the value of Black Bright, that is the color your auto suggestions will have. It will be displayed on top of the Background color. If there is not enough contrast between the two, you won’t see the suggestions even if they’re actually there..

Enable word jumps and word deletion, aka natural text selection

By default, word jumps (option + → or ←) and word deletions (option + backspace) do not work. To enable these, go to “iTerm → Preferences → Profiles → Keys → Key mappings → Presets… → Natural Text Editing → Boom! Head explodes”

Syntax highlighting

Clone the repository:

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

Activate the plugin in ~/.zshrc:

plugins=( [plugins...] zsh-syntax-highlighting)

Restart iTerm2 for all changes to take effect.

Visual Studio Code config

Installing a patched font will mess up the integrated terminal in VS Code unless you use the proper settings. You’ll need to go to settings (CMD + ,) and add or edit the following values:

  • for Source Code Pro + Font Awesome: "terminal.integrated.fontFamily": "'SourceCodePro+Powerline+Awesome Regular'". The single quotes are important! Restart VS Code after the config change.
  • for Source Code Pro: "terminal.integrated.fontFamily": "Source Code Pro for Powerline"
  • for Meslo: "terminal.integrated.fontFamily": "Meslo LG M for Powerline"
  • for other fonts you’ll need to check the font name in Font Book. You can right click on them on select “Show in Finder” to get the exact name.

You can also set the fontsize e.g.: "terminal.integrated.fontSize": 14


Please enter your comment!
Please enter your name here

Latest news

Tổng hợp Paypal limit –Nguyên nhân phòng tránh và cách gỡ paypal limit

Limit Paypal là gì? Khi bạn tham gia kiếm tiền trên mạng hay tạo dựng kinh doanh online thu nhập ổn...

Cài đặt Janus Gateway và Nginx with rtmp module

Janus là một mã nguồn mở của webRTC, cung cấp nhiều tiện ích giúp cho việc Chat, Videos/Audio call,...

“Multitasking làm giảm 10 điểm IQ ở con người”: Khoa học đã chứng minh

Nếu bạn còn đang băn khoăn có nên mutitask (đa tác vụ) hay không, thì hãy dành ra 3...


Chắc hẳn trong công việc, mọi người đều có những mục tiêu riêng, đích đến nhất định qua các...
- Advertisement -

Data Engineer là gì? Mọi thứ bạn cần biết về kỹ sư dữ liệu

Chúng ta rất dễ bỏ qua lượng dữ liệu được tạo ra hàng ngày – từ điện thoại thông...

Dữ liệu là gì? Tầm quan trọng của dữ liệu khách hàng đối với doanh nghiệp

Đa số các bạn marketer hay những nhà quản lý nghĩ rằng; điều khiển dữ liệu (data-driven) có nghĩa...

Must read

“Multitasking làm giảm 10 điểm IQ ở con người”: Khoa học đã chứng minh

Nếu bạn còn đang băn khoăn có nên mutitask...
- Advertisement -

You might also likeRELATED
Recommended to you