A beautiful and colourful coding UI can make us happy.
- For Shell,
Life is short, I am ZSHer. - For Terminal, I chosen
iTerm 2, instead ofTerminalof Mac.
Below is my iTerm 2 UI.

iTerm 2
iTerm 2: Download
Download iTerm 2 from official site, unzip the ZIP file and put the iTerm 2 application to your preferred directory of your Mac, recommend store iTerm 2 application to directory /Application.
Transparency setting for iTerm 2
I like transparent UI in Terminal, so in this setup, setting transparency for iTerm 2.
- Open
iTerm 2. - Open
PreferencesofiTerm 2:- Click
iTerm->Preferences...atmenu baror - Press shortcut keys
Command + ,.
- Click
- Tap
ProfileinPreferences. - Select your preferred
Profileat the left list view, the user profile list. - Change
Window Appearance->Transparencyas you prefer the transparency by scrolling the bar.

Install oh-my-zsh
The Shell ZSH is better than Bash, and in Mac, the default Shell is Bash.
Installing oh-my-zsh, the installer will change the Shell from Bash to ZSH, and maybe the installation will ask you to input ROOT's password for the Shell changing, as change Shell need ROOT permission.
Enter the command below in iTerm 2 or Terminal to install oh-my-zsh:
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
Install Powerline
For display Non-ASCII characters, we need to install Powerline.
From official site of Powerline, to install Powerline just command run below:
pip install powerline-status
If no pip installed, you need to install pip first, the installation command is:
sudo easy_install pip
Fonts download and install: Powerline Fonts
- Download the project from
Githuband unzip it. - Change directory to the directory just unzip �at step 1.
- Run
./install.shto install allPowerline Fonts.
After the installation completed, all Powerline Fonts were installed to directory
/Users/<Your Home Directory>/Library/Fonts
and in iTerm 2 or Terminal, message can be saw:
All Powerline fonts installed to /User/<Your Home Directory>/Library/Fonts
Fonts Setting for iTerm 2: Regular Font, Non-ASCII Font
After Powerline Fonts installed, we can setting fonts to iTerm 2.
As mention above, Poweline Fonts is the solution for displaying Non-ASCII character in iTerm 2 or Terminal correctly, so I keep Regular Font default setting and set Non-ASCII Font to font Inconsolata for Powerline with 14pt.
- Open "Preferences" of
iTerm 2. - Goto
Profile->Text, you will findRegular FontandNon-ASCII Fontsettings. - Click
Change Fontbutton in sectionNon-ASCII Font. - Select fonts
Inconsolata for Powerlineand select the font size to14pt.

Colour Scheme installation for iTerm 2: Solarized
- Download Solarized theme from Github, unzip it.
- Change directory to the upzip project folder and change directory to folder
iterm2-colors-solarized. - Double click the theme installation file to install the colour scheme for
iTerm 2:Solarized Dark.itermcolors,Solarized Light.itermcolors.
Colour Scheme Setting for iTerm 2
After Solarized colour scheme installed, now can setup Solarized scheme to iTerm 2.
I like the dark style as the UI is not too sharp.
- Open
PreferencesofiTerm 2. - Goto
Profile->Colors. - Click dropdown menu
Load Presets..., and selectSolarized Dark.

Install theme Cobalt2
Why Cobalt2 and not Agnoster?
Agnoster theme, before prompt, display username, hostname, it is long.
Cobalt2 theme is hide username, hostname, so looks shorter for prompt.
Though can modify "Agnoster" configuration to hide username and hostname, stupid I chosen to install others theme.
- Download
Cobalt2project from Github, unzip it. - Copy
Cobalt2project filecobalt2.zsh-themetooh-my-zshtheme folder, the folder path is:
~/.oh-my-zsh/themes/ - Setting
ZSHtheme toCobalt2, openZSHsetting file:
vim ~/.zshrc. - Change the theme setting to
Cobalt2, change the value of variableZSH_THEMEtocobalt2.
ZSH_THEME=cobalt2.
After ZSH theme set, run source to make the ZSH environment setting to activate:
source ~/.zshrc
Now you can check the iTerm 2 displaying in colourful, looks good.


Install Syntax Highlight: ZSH Syntax Highlighting
Syntax highlighting is display entering command in GREEN colour if it is correct, otherwise in RED if it is incorrect.
- Change directory to
.zshrcdirectory.
Warm reminder, file.zshrcdirectory is current login user's home directory, you can change directory to your home directory bycddirectory. - Run
git clonecommand to cloneZSH-Syntax-Highlightingproject to the directory.
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git - Open
.zshrc, and add the context below to the end of.zshrc:
source XXX/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
plugins=(zsh-syntax-highlighting)
please note that,XXX=Directoryof.zshrc.
Save and quit.zshrcwith:wq - Source
.zshrc:
source ~/.zshrc

Problem:
- Actually, one thing in Solarized scheme is trouble me, it is display the syntax of VIM is bad, it looks that no syntax highlighting for variables, value, etc., please check screenshot below.

Update (Mar -12 -2016)
Use Cobalt2 colour scheme can display VIM in colour.
- Download Cobalt2 project for
iTerm 2fromGithub. - Double click
Cobalt2project filecobalt2.itermcolorsto installCobalt2scheme. - Change
iTerm 2colour scheme toCobalt2.
