[关闭]
@zzzxxxyyy 2018-08-01T00:14:31.000000Z 字数 1353 阅读 1125

mac iterm2 配置

mac


1. iterm2 安装(需要安装homebrew)

  1. brew cask install iterm2

2. oh-my-zsh 安装(在下载的iterm2 中输入代码)屏幕快照 2018-07-31 下午5.33.48.png-90.1kB

  1. curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh

3. 安装 powerline(需要安装pip)

  1. pip install powerline-status

4. 安装字体库

  1. git clone https://github.com/powerline/fonts.git
  2. cd fonts
  3. ./install.sh

屏幕快照 2018-07-31 下午6.07.41.png-57.8kB

5. 设置iTerm 2的Regular Font 和 Non-ASCII Font

屏幕快照 2018-07-31 下午6.25.11.png-466.5kB

6 设置配色方案

github 下载

  1. git clone https://github.com/altercation/solarized

进入刚刚下载的工程的solarized/iterm2-colors-solarized 下双击 Solarized Dark.itermcolors 和 Solarized Light.itermcolors 两个文件就可以把配置文件导入到 iTerm2 里

屏幕快照 2018-07-31 下午6.58.21.png-435.9kB

7 使用agnoster主题

  1. git clone https://github.com/fcamblor/oh-my-zsh-agnoster-fcamblor
  2. cd oh-my-zsh-agnoster-fcamblor
  3. ./install

进入~/.zshrc打开.zshrc文件,然后将ZSH_THEME后面的字段改为agnoster。ZSH_THEME="agnoster"(agnoster即为要设置的主题)

8增加指令高亮效果——zsh-syntax-highlighting

  1. git clone git://github.com/zsh-users/zsh-syntax-highlighting.git

1)cd到.zshrc所在目录

2)执行指令将工程克隆到当前目录

git clone git://github.com/zsh-users/zsh-syntax-highlighting.git

3)打开.zshrc文件,在最后添加下面内容

source XXX/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

保存文件。

注意:xxx代表.zshrc所在目录

4)cd ~/.oh-my-zsh/custom/plugins

5)再次打开.zshrc文件,在最后面添加下面内容

plugins=(zsh-syntax-highlighting)

保存文件。

9 添加自动补全 类同

  1. cd ~/.oh-my-zsh/custom/plugins/
  2. git clone https://github.com/zsh-users/zsh-autosuggestions
  3. vi ~/.zshrc

找到plugins,加上这个插件即可:

参考

https://www.jianshu.com/p/7de00c73a2bb
http://matt33.com/2016/07/09/mac-software/
https://github.com/sirius1024/iterm2-with-oh-my-zsh

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注