1. InstallITerm2 官网 download
2. Open iTerm2 and perform the following operations on iTerm2
3. The installationoh-my-zsh
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
Copy the code

If there is a

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
Copy the code

The connection to port 443 is rejected because of the wall. If you have access to Virtual Private Network, use the following command:

Export https_proxy http_proxy = = http://127.0.0.1:7890 http://127.0.0.1:7890 all_proxy = socks5: / / 127.0.0.1:789Copy the code

The inconvenience of this method is that after running the above command line, all commands of the current session of the terminal are over the wall. The solution is also simple: close the current terminal session (or more violence, close the terminal and open again).

4. InstallPowerline
pip install powerline-status
Copy the code

If there is no PIP, ZSH: Command not found: PIP appears. Run the following command

sudo easy_install pip
Copy the code
5. Install the font filefonts
# clone
git clone https://github.com/powerline/fonts.git --depth=1
# install
cd fonts
./install.sh
# clean-up a bit
cd ..
rm -rf fonts
Copy the code
6. Set the font

I’ve chosen Meslo, LG, L, DZ for Powerline

7. Install color matchingsolarized
git clone git://github.com/altercation/solarized.git

cd solarized/iterm2-colors-solarized
open .
Copy the code

Double-click the folders once they are open to import the configuration files into iTerm2

8. Install themesoh-my-zsh-agnoster-fcamblor
1. git clone [email protected]:fcamblor/oh-my-zsh-agnoster-fcamblor.git 2. vi ~/.zshrc 3. 4. Find ZSH_THEME and change it to ZSH_THEME="agnoster" 5. Press Esc. 6. Enter :wq to save the configuration and exitCopy the code
9. Install highlightszsh-syntax-highlighting
1. git clone git://github.com/zsh-users/zsh-syntax-highlighting.git 2. 3. Vi ~/.zshrc 4. 5. Last line add source XXX/ zsh-syntax-considering/zsh-syntax-considering. ZSH XXX is just now. Find the plugins = (...). Add zsh-syntax-considering =(git) after adding plugins=(git zsh-syntax-considering)Copy the code

ZSH -syntax-highlighting has been at the end

10. Command automatic completionzsh-autosuggestions
1. cd ~/.oh-my-zsh/custom/plugins/ 2. git clone https://github.com/zsh-users/zsh-autosuggestions 3. vi ~/.zshrc Add plugins=(git zsh-autosuggestions zsh-syntax-highlighting)Copy the code

Type a “G” and you’ll be prompted

11. Add background

Vscode is garbled

Edit Settings. The json file to add the following configuration “terminal. Integrated. Shell. Osx” : “/ bin/ZSH”, “terminal. Integrated. FontFamily” : “Source Code Pro for Powerline”

ITerm 2 && Oh My Zsh