天天看點

MacOS:iTerm2+oh-my-zsh安裝iTerm2+ohmyzsh安裝一、安裝iterm2二、安裝oh my zsh三、oh-my-zsh插件安裝

iTerm2+ohmyzsh安裝

先看效果圖:

用的主題

  • 1.iterm2>Preferences>Profiles>Colors>Color Presets>Solarized Dark
  • 2.oh-my-zsh預設 主題: ZSH_THEME=“robbyrussell”
    MacOS:iTerm2+oh-my-zsh安裝iTerm2+ohmyzsh安裝一、安裝iterm2二、安裝oh my zsh三、oh-my-zsh插件安裝

一、安裝iterm2

直接網上下載下傳輕按兩下安裝即可

二、安裝oh my zsh

oh-my-zsh

1.curl安裝

2.wget安裝

3.配置檔案

配置檔案位置:~/.zshrc,可根據自己的需求自定義配置, 如主題(ZSH_THEME)、插件(plugins)等

三、oh-my-zsh插件安裝

1.文法高亮插件:zsh-syntax-highlighting

  • 進入插件目錄、下載下傳
cd ~/.oh-my-zsh/custom/plugins/
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
           
  • 修改.zshrc配置檔案
vim ~/.zshrc

# plugins中添加高亮插件
plugins=(
    git
    zsh-syntax-highlighting
)

# 在檔案最後一行再加上

source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
           
  • 配置生效
source ~/.zshrc
           

繼續閱讀