最漂亮( iTerm2+oh-my-zsh配色)

1.上截图:git

2.首先安装item2github

(1)安装homebrewshell

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew install cask
(2)安装iterm2
brew cask install iterm2
brew install zsh 安装
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
3.安装oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
安装成功如图:

4.安装Powerlinevim

pip install powerline-statusruby

5.安装Meslo字体app

# clone
git clone https://github.com/powerline/fonts.git --depth=1
# install
cd fonts
./install.sh
# clean-up a bit
cd ..
rm -rf fontscurl

6.配置item2:(iTerm2>Preferences>Profiles>Text>Change Font),以下图:编辑器

  • 若是没有发现紫色框的Non-ASCII Font,先在绿色箭头所指的地方打钩,而后再重启.
  •   

 

7.下载安装solarized配色方案字体

  • 进入刚下载的solarized目录下:solarized/iterm2-colors-solarizedurl

    双击安装 Solarized Dark.itermcolors和 Solarized Light.itermcolors

    可是不建议这样安装,由于如今iTerm2已经内置了这两种配色。直接选择就行

 

 

  • 在下图中所指的地方直接选择就行

八、安装agnoster主题。

  • oh-my-zsh已经内置该主题,不用再单独下载了
  • 直接配置就好了
    • 进入根目录
    • 用vim编辑器打开隐藏文件.zshrc,将ZSH_THEME后面字段改成agnoster.

 

  • 从新打开iTerm2,效果以下

9.设置语法高亮

(1)直接使用homebrew安装zsh-syntax-highlighting插件

    brew install zsh-syntax-highlighting

(2)而后在根目录下.zshrc中插入下面内容:

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

10.自动提示命令:已经内置了,就不在说了

11.最后说一下效果图中大拇指的配置:

  (1)进入主题目录

           cd ~/.oh-my-zsh/themes

  (2)打开agnoster主题,按红框里面的编辑保存完退出就行了

    vim agnoster.zsh-theme

12.shell的切换

(1)查看shell

  cat /etc/shells

(2)更改shell

  chsh -s /bin/zsh

(3)查看当前shell,但不能时时反映shell,需重启iTerm2: 

       echo $SHELL

相关文章
相关标签/搜索