He who knows is better than he who is good, and he who is good is better than he who enjoys. – Confucius
Before we go on, please do a questionnaire:
- Development used in the command line operation interface (Ternimal) operation, please in the comments section Q 1
- Used to GUI manipulation (or mouse click), please click in the comments section
If you are a donor of Q1, then you should definitely read this article; If you are a q2 donor, you need to check it out, in case you decide to switch to Ternimal one day
Results show
Homebrew
Package management tools for Mac OS (or Linux) (similar to NPM)
The official documentation
- Method 1: Ruby script installation
# 1. Enter the following command in Ternimal to install Homebrew
$ /bin/bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install.sh)"
# 2. Check whether the installation is successful (if the version number is displayed, the installation is successful; Please re-execute the above installation values.)
$ brew --version
# View the packages installed via Homebrew
$ brew list
Check the specified package path
$ brew list packageName
Copy the code
- Git Clone
# 1. Download the Homebrew source file using Git
git clone https://github.com/Homebrew/brew.git
# 2. Copy the downloaded files to /usr/local/
# 3. Check whether the installation is successful (if the version number is displayed, the installation is successful; Please re-execute the above installation values.)
$ brew --version
Copy the code
iTerm2
Another Ternimal for Mac (more versatile than native Ternimal)
The official documentation
- Method 1: Homebrew command installation
Brew cask file created by brew cask
$ brew tap homebrew/cask-cask
# 2. Install iTerm2
$ brew cask install iterm2
Copy the code
- Git Clone
# 1. Go to the iTerm2 website to download the installation package
# 2. Unpack the file and click on iterm2.app to complete the installation automatically
Copy the code
The color scheme
- Let iTerm2 support more color schemes, seven by default
iTerm2 / preferences / profiles / Terminal / Reprot terminal type
- Download the color matching file (recommended here
iTerm2-Color-Schemes
This color library)
Git to download iterm2-color-schemes
git clone https://github.com/mbadolato/iTerm2-Color-Schemes
Copy the code
- Import the matching font
Import all files of iterm2-color-schemes/Schemes
I would recommend Dracula (the Vampire Diaries 😆)
Icon font
The default font does not contain any ICONS, so you can download the Nerd font library
- Method 1: Homebrew command installation
# 1. Create a fonts file
$ brew tap homebrew/cask-fonts
# 2. Call me a nerd
$ brew cask install font-hack-erd-font
Copy the code
- Git Clone
# 1. Use git to download the nerd-fonts source file
$ git clone https://github.com/ryanoasis/nerd-fonts.git
# 2. Go to the nerd-fonts directory
cd nerd-fonts
# 3. Execute the nerd-fonts installer
./install.sh
Copy the code
Configure iTerm2/Text as shown
on-my-zsh
Allow ZSH to support more personalization
# installed on - my - ZSH
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Copy the code
The following figure shows the successful installation
powerlevel9k
Compare recommended ZSH themes
- Method 1: Homebrew command installation
$ brew install powerlevel9k
Copy the code
- Git clone
Download the PowerLevel9k source file with Git and copy the downloaded file to your custom theme directory of oh-my-zsh
$ git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
Copy the code
Configure the ZSHRC file
The theme
- Open the ZSHRC file
open ~/.zshrc
Copy the code
- Set up the PowerLevel9k theme
# =========== Add =========== to the ZSHRC header line
Method 1 references the PowerLevel9k theme (added via brew download)
source /usr/local/ Cellar/powerlevel9k / 0.6.7 / powerlevel9k ZSH - theme# Set up the PowerLevel9k theme (add via git download)
# ZSH_THEME="powerlevel9k/powerlevel9k"
Nerd font = nerd font
POWERLEVEL9K_MODE="nerdfont-complete"
# Add a line break before each prompt
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
# Delete the content on the right
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=()
Copy the code
- ZSHRC modification takes effect
Restart ZSHRC configuration (each ZSHRC change must be restarted for the configuration to take effect)
$ source ~/.zshrc
Copy the code
The plug-in
- ZSH -syntax-highlighting: command highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
Copy the code
- Zsh-autosuggestions: Automatically prompts for previously entered commands
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Copy the code
Find the plugin in the ZHSRC configuration file and write the name of the plugin to use itPlugins =(git // git web-search# Search for relevant content by 'search engine' + 'keyword'
extract Unzip the zip file
zsh-syntax-highlighting
zsh-autosuggestions
)
Copy the code
The alias
Open the oh-my-zsh configuration file
alias zshrc="open ~/.zshrc"
Copy the code
colors
Displays file ICONS by suffix
# 1. Download colorls
$ gem install colorls
# 2. View files
$ colorls
# 3. View file details
$ colorls -la
Copy the code
The vscode terminal does not support Nerd font
// add it in the vscode configuration file
"terminal.integrated.fontFamily": "Hack Nerd Font".Copy the code