Based on https://gist.github.com/kevin-smets/8568070
-
Install iTerm2
-
Import patched Solarized Dark under Settings → Profiles → Colors → Color Presets…
More info on patched vs vanilla Solarized Dark:
In short: non-patched Solarized Dark will render some text invisible (for example, zsh-autosuggestions).
For autosuggestions this could be easily fixed by adding ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#586d74,light"
.
But there are no such fixes for every other app which want to output text in “Bright Black” color (only solution is to change Bright Black to something brighter than Normal Black in Settings → Profiles → Colors).
On the other hand, patched Solarized Dark introduces rendering issue with Solarized Dark theme for Vim.
So, either Solarized Dark for Vim should be patched too, or just use another color scheme for vim alongside with patched Solarized Dark for iTerm2. For example, Primary works well for me.
Feel free to use patched Solarized Dark for default Terminal too (don’t forget to also set appropriate fonts).
- Install Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Configure homebrew completions by updating ~/.zshrc
:
# This must be done before compinit is called, i.e. before you call oh-my-zsh.sh
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
fi
- Install Source Code Pro for Powerline font.
Set under Settings → Profiles → Text.
Important: Check “Use built-in Powerline glyphs”.
- Configure
~/.zshrc
:
ZSH_THEME="agnoster"
# User configuration
# ...
hash -d icloud="$HOME/Library/Mobile Documents/com~apple~CloudDocs/"
alias icloud="cd ~icloud"
export HOMEBREW_NO_ANALYTICS=1
DEFAULT_USER=$(whoami)
- Install zsh syntax highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
- Install zsh autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
-
Enable word jumps with arrow keys: Preferences → Profiles → Keys → Preset... → Natural Text Editing
-
Set up syntax highlighting for Vim:
- Install Vim Polyglot:
mkdir -p ~/.vim/pack/default/start
git clone https://github.com/sheerun/vim-polyglot ~/.vim/pack/default/start/vim-polyglot
mkdir -p ~/.vim/colors
curl -L -o ~/.vim/colors/primary.vim https://raw.githubusercontent.com/google/vim-colorscheme-primary/master/colors/primary.vim
- Update
~/.vimrc
:
syntax on
set t_Co=256
set background=dark
colorscheme primary
- Update custom plugins whenever needed:
cd ~/.oh-my-zsh/custom/plugins
find . -type d -depth 1 -exec git --git-dir={}/.git --work-tree=$PWD/{} pull origin master \;