Mac iTerm2 配置
安裝
brew install iTerm2
安裝完成之后,需要重新打開終端,既可以看見安裝 iTerm2 的效果。
iTerm2 美化
使用 oh-my-zsh
美化 iTerm2 終端
-
安裝
brew install wget
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
-
sh 下載失敗時,手動去 github 倉庫下載,放到 用戶目錄 下的
.oh-my-zsh
文件夾中去# clone源碼: git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh # 復制創建.zshrc: cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc # 讓.zshrc生效: source ~/.zshrc # (可選)shell切換成 zsh: chsh -s /bin/zsh
-
執行之后,發現 zsh 發生了變化,即 oh-my-zsh 安裝完成。
-
配置 zsh 主題
# 打開.zshrc vim ~/.zshrc # 找到 ZSH_THEME 這一行 # 修改為 ZSH_THEME="ys" (也可以使用ys) # wq保存退出 # 使修改生效 source ~/.zshrc
-
安裝 powerline 解決字體渲染問題
pip3 install --user powerline-status
-
安裝字體
# clone git clone https://github.com/powerline/fonts.git --depth=1 # install cd fonts && ./install.sh # clean-up a bit cd .. && rm -rf fonts
-
安裝插件
語法高亮
cd ~/.oh-my-zsh/custom/plugins/ git clone git://github.com/zsh-users/zsh-syntax-highlighting.git vim ~/.zshrc 找到plugins 加上 zsh-syntax-highlighting
命令補全
cd ~/.oh-my-zsh/custom/plugins/ git clone https://github.com/zsh-users/zsh-autosuggestions vim ~/.zshrc 找到plugins 加上 zsh-autosuggestions