2018 Annual update :

It was found that agnoster Although the theme is beautiful , But in the actual use of the process is not very friendly to the user , Personally speaking ys The theme suits me better .

Change theme :

ZSH_THEME="ys"


Recently the system was reinstalled , So I reconfigured the terminal , Make it more user-friendly .

The effect is as follows :

Have syntax highlighting , Command line tab completion , Automatic prompt , Show Git Warehouse status and other functions .

install

First we download iTem2 This software , Than Mac The built-in terminal is more powerful . Direct to the official website  http://iterm2.com/  Download and install .

To configure

take iTem2 Set as default terminal :

( menu bar )iTerm2 -> Make iTerm2 Default Term

Then turn on preferences preference, Choose Keys, Check Hotkey Under the Show/hide iTerm2 with a system-wide hotkey, Set the hotkey to command+. , So you can go through command+. Global hotkeys to turn on or off iTerm2 window , Very convenient .

The color scheme

I chose  solarized, It's not bad . Click to open the official website , download , decompression , Then open the iTerm2 Under preferences preference , It opens at profiles Under the colors Options , Click on the Color Presets Options , choice import , Import the extracted solarized Under the document Solarized Dark.itermcolors.

install oh-my-zsh

github Connect :https://github.com/robbyrussell/oh-my-zsh

Use crul install :

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Or use wget:

sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

The theme

After successful installation , use vim Open hidden file .zshrc , Change the theme to agnoster:

ZSH_THEME="agnoster"

Applying this theme requires special font support , Otherwise, there will be disorder , Now let's configure the font :

1. Use Meslo typeface , Click on the link and click view raw Download Fonts .

2. Install fonts into the system font book .

3. Apply fonts to iTerm2 Next , I like to set the font size to 14px, It's comfortable to watch (iTerm -> Preferences -> Profiles -> Text -> Change Font).

4. Reopen iTerm2 window , Now you can see the effect .

At this stage, our terminal looks very good , Now let's install other plug-ins , Let the terminal look more coquettish .

Auto prompt command

When we type the command , The terminal will automatically prompt you for the following commands that you may enter , Now press → You can output these commands , Very convenient .

Set as follows :

1. Clone warehouse to local ~/.oh-my-zsh/custom/plugins Under the path

git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

2. use vim open .zshrc file , Find the plug-in settings command , The default is  plugins=(git) , Let's change it to

plugins=(zsh-autosuggestions git)

3. Reopen the terminal window .

PS: When you reopen the terminal, you may not see the change , Maybe your font color is too light , Let's turn it on a little bit :

Move to ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions Under the path

cd ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions

use vim open zsh-autosuggestions.zsh file , modify ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=10' ( fg=10 It's good on my computer ).

Syntax highlighting

1. Use homebrew install  zsh-syntax-highlighting plug-in unit .

brew install zsh-syntax-highlighting

2. To configure .zshrc file , Insert a row .

source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

3. Enter the command .

source ~/.zshrc

PS: install homebrew Package management tools :

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

* Now open the terminal window , Your terminal looks as beautiful as mine ~

*use it and enjoy it~

Mac Next terminal configuration (item2 + oh-my-zsh + solarized The color scheme ) More articles about

  1. Mac OS Strengthen and beautify the terminal :iterm2 + zsh + oh~my~zsh Set up a tutorial

    For better typesetting , The article uses markdown writing , So send it again . Preface mac Self contained terminal The terminal does not have the function of highlighting the file name , And the interface is not very nice , Therefore, my roommates are struggling with the terminal , You can make it more convenient to use , ...

  2. Record --mac Environment variables in the terminal

    I've been using it since I bought it a few years ago MacBook Air, It felt very frivolous at that time , The appearance is also very nice , It's always been used now , About three or four years , The system is still very fluid ( The truth , It's not advertising ......). It's usually used mac Terminal , Tell the truth ...

  3. MAC Next Xcode To configure opencv(2017.3.29 The latest practice , Pro feasible measurement )

    This article is original. , Without consent , Declined reprint !( Please let me know and agree to reprint --By Pacific-hong) I have a small one , Because the professional direction is related to the image , So we use opencv, And then online MAC Next Xcode To configure opencv ...

  4. MAC Next Xcode To configure opencv(2017.3.29 The latest practice , Pro feasible measurement )( turn )

    This article is original. , Without consent , Declined reprint !( Please let me know and agree to reprint --By Pacific-hong) I have a small one , Because the professional direction is related to the image , So we use opencv, And then online MAC Next Xcode To configure opencv ...

  5. Mac Next VIM To configure

    Mac Next VIM To configure First , Let's go here and download MacVim, You can also use this website :(http://code.google.com/p/macvim/), The interface is as follows : ____________________ ...

  6. Mac Next iTerm2 To configure lrzsz function

    Mac Next iTerm2 To configure lrzsz function rz,sz yes Linux/Unix Same as Windows Conduct ZModem Command line tools for file transfer . The advantage is that there is no need to open another one sftp Tools log in to upload and download files . Recently mac Shangtong ...

  7. mac The next terminal access file appears “Permission Denied” Solution

    mac The next terminal access file appears “Permission Denied” Solution : A file has 3 Species jurisdiction , read . Write . Executable , You don't have executable rights to this file , You need to add executable permissions . 1. Terminal first cd Go to the directory of the file 2 ...

  8. Mac Next How to configure virtual machine software Parallel Desktop-- Hyperdetail

    Mac Next How to configure virtual machine software Pparallel Desktop-- Hyperdetail Mac There are two kinds of dual system solutions for , One is to use Boot Camp Partition install independent Windows, One is through installation Parallels D ...

  9. Mac Lower terminal (terminal) Some of the shortcuts

    Mac Lower terminal (terminal) Some of the shortcuts Head of line ctrl + a At the end of the line ctrl + e Two terminal windows switch alt + Direction key In command , Last word esc + b (iterm2) The next word esc + ...

Random recommendation

  1. NeuSoft(2) Add system calls

    1. Download the kernel apt-get install linux-source stay /usr/src Next 2. Unzip the kernel cd /usr/src tar -jxvf linux-source-3.2.0.tar.b ...

  2. redis Installation and use

    linux: 1. download redis download redis: Can be in redis Download on : http://redis.io/ You can also go to Google code download : http://code.google.com/p/r ...

  3. sql - Select the row in the specified range

    Select no=Identity(int,1,1),* Into #temptable From dbo.tName order by fName -- utilize Identity Function to generate record sequence number Sel ...

  4. Vim+Taglist+Ctags( Source code reading ).

    We finally got it , Two days ago , Don't successful . Software required : ctags taglist 1,ctags. 1) explain : I won't demonstrate this , my RedHat5.5 Itself has ctags. 2) verification ctags Whether or not ...

  5. Wechat payment :redirect_uri Parameter error Solutions for

    redirect_url Parameter error : Report this error , There is a problem with the background authorization settings of your official account ( There are usually two ) One : Check the authorization Directory answer : The payment authorization directory is the directory of the page where the website initiated the request , And it has to be able to pass url Address access ( With reality ...

  6. asp.net EF6.0 No fixed name found in “System.Data.SqlClient” Of ADO.NET Provider entity framework provider solution

    The error message that appears is as follows : The specified schema is invalid . error :  DataModel.ssdl(2,2) :  error  0152:  No fixed name found “System.Data.SqlClient” Of  ADO.NET  carry ...

  7. webpack.config.js The parameters are easy to understand

    webpack.config.js Files are usually placed in the root of the project , It's also a standard in itself Commonjs Standardized modules . var webpack = require('webpack'); module.exp ...

  8. XML Learning summary ( Two )——XML introduction

    XML Learning summary ( Two )——XML introduction One .XML Grammar learning Study XML The purpose of grammar is to write XML One XML The document is divided into the following parts : The document statement Elements attribute notes CDATA District  . Special characters A processing instruction (proc ...

  9. 【DG】Oracle_Data_Guard Official literal translation

    [DG]Oracle Data Guard Official literal translation 1 Oracle Data Guard Introduce   Oracle Data Guard Concept and management 10g edition 2   Oracle Data Guard ...

  10. css Pseudo class selector

    1):link/:visited/:hover/:active ( Principles of love and hate love/hate)2):first-child/:last-child/:only-child/:nth-child(n) ...