iTerm2andoh-my-zshCollaboration betweenMacterminal

(a)iTerm2

1. Install and set the terminal as the default terminal

  1. downloadAnd installiTerm2
  2. williTerm2Set as default terminal:iTerm2 -> Make iTerm2 Default Term

2. Setting the background image

  1. Select background image:iTerm2 -> Preferences -> Profiles -> Window -> Background Image -> Enabled

  1. Set transparency: YesBlendingAdjust the diaphaneity of wallpaper, diaphaneity rises more transparent

Effect:

3. Font Settings

  1. throughpipThe installationPowerLine:
#Install Python3 from HomeBrew to obtain easy-install
brew install python3
#Get the PowerLine through PIP
pip install powerline-status --user
Copy the code
  1. Create an empty directory in the appropriate location and run the following command to install the font library:
git clone https://github.com/powerline/fonts.git --depth=1
cd fonts
./install.sh
# Powerline fonts installed to /Users/dragonbaby308/Library/Fonts
cd /Users/dragonbaby308/Library/Fonts
Copy the code
  1. Set font:ITerm2 -> Preferences -> Profiles -> Text -> Font -> Select the Font

4. Color matching Settings

  1. Create an empty directory in the appropriate location and run the following command to download the color scheme:
git clone https://github.com/altercation/solarized
cd solarized/iterm2-colors-solarized/
#Open the Finder
open .
Copy the code
  1. In the window that opens, double-clickSolarized Dark.itermcolorsandSolarized Light.itermcolorsYou can install light and dark two colors:

  1. Set color matching:iTerm2 -> Preferences -> Profiles -> Colors -> Color Presets

(2)oh-my-zsh

1. Install

  1. MacUse the defaultdashAs a terminal, throughchsh -s /bin/zshChange the default terminal tozsh
  2. The installationoh-my-zsh:
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
Copy the code

2. Theme download and configuration

  1. To create an empty directory, run the following command:
git clone https://github.com/fcamblor/oh-my-zsh-agnoster-fcamblor.git
cd oh-my-zsh-agnoster-fcamblor/
#Running this command will copy the themes to the oh-my-zsh themes directory, or you can do this manually
./install
Copy the code
  1. Modifying a configuration file:vi ~/.zshrc
#Configure the topic to ys
ZSH_THEME="ys"
Copy the code
  1. source ~/.zshrcMake the configuration take effect

3. Install the plug-in

  1. Plug-in installation
#Syntax highlighting plugin
sudo git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
#Command completion plug-in
sudo git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
Copy the code
  1. Modifying a configuration file:vi ~/.zshrc
#Zsh-syntax-highlighting must be the last!
plugins=(git, zsh-autosuggestions, zsh-syntax-highlighting)
Copy the code
  1. source ~/.zshrcMake the configuration take effect

If the autocomplete color is indistinguishable from the background color, you can configure the autocomplete font color in the first line of iTerm2 -> Preferences -> Profiles -> Colors -> ANSI Colors -> Bright on the right.