iTerm2has always been my favorite terminal. I use it for everything from my development work to regular usage. Here's my note to setup my iTerm2 preferences.
Installation
brew install iterm2
Install Newest zsh Release From HomeBrew
zsh is the default shell for macOS since macOS 10.14. Its version is managed by OS, I would like to use the latest version, so I choose install it from HomeBrew.
brew install zsh ## Install `zsh`
where zsh ## find installation path
chsh -s /opt/homebrew/bin/zsh ## change shell to `zsh` installed from HomeBrew
Install Starship
Starship is a minimal, blazing-fast, and infinitely customizable prompt for any shell!
I use it for:
- Git prompt
- Development environment prompt
- Shell Theme
brew install starship
echo 'eval "$(starship init zsh)"' >> ~/.zshrc
source ~/.zshrc
zsh Plugins
brew install zsh-autosuggestions
echo "source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
brew install zsh-syntax-highlighting
echo "source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc
source ~/.zshrc
Color Schemes
Import Color Schemes
- Download color schemes by clone the repository.
git clone https://github.com/mbadolato/iTerm2-Color-Schemes.git
- Press
⌘ + ,to open iTerm2 preferences. - Select
Profilestab. - Select
Colorstab. - Find
Color Presets...at the right bottom. - Scroll to the end of
Color Presets...'s options to findImport.... - Import all
.itermcolorsfiles from theschemedirectory of the cloned repository.
Minimal Tab
Minimal Tab shows the same color of current profile's color preset.
- Press
⌘ + ,to open iTerm2 preferences. - Select
Appearancetab. - Find
ThemeinGeneralsecondary tab. - Select
Minimal.
Transparency
- Press
⌘ + ito open preferences. - Select
Windowtab. - Set
TransparencyandBlur.
Font
I'd prefer JetBrainsMono Nerd Font.
Nerd fonts for terminal can be install from HomeBrew:
brew tap homebrew/cask-fonts
brew install font-jetbrains-mono-nerd-font
Set Font for Profiles
- Press
⌘ + ,to open iTerm2 preferences. - Select
Profilestab. - Select
Texttab. - Select font at
Fontsection.
Natural Text Editing
I would prefer ⌘ + arrow to move cursor, so I have to switch the terminal input Key Mappings preset to Natural Text Editing.
- Press
⌘ + ,to open iTerm2 preferences. - Select
Keystab. - Select
Key Mappingsecondary tab. - Find
Presets...at left bottom. - Select
Natural Text Editing.
