MacOS:iTerm2+oh-my-zsh安裝

iTerm2+ohmyzsh安裝

先看效果圖:
用的主題

  • 1.iterm2>Preferences>Profiles>Colors>Color Presets>Solarized Dark
  • 2.oh-my-zsh默認 主題: ZSH_THEME=“robbyrussell”
    oh-my-zsh

一、安裝iterm2

直接網上下載雙擊安裝即可

二、安裝oh my zsh

oh-my-zsh

1.curl安裝

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

2.wget安裝

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

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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章