Mac 安裝 oh-my-zsh + autojump + zsh-autosuggestions + zsh-syntax-highlighting + solarized 配色

yanthink發表於2019-01-12

檢視Mac上已有的shell

cat /etc/shells

/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh

將預設shell改成zsh

chsh -s /bin/zsh

安裝oh my zsh

git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

配置zsh

vim ~/.zshrc

ZSH_THEME="ys"
plugins=(git brew laravel5)

shell solarized 配色

git clone git://github.com/altercation/solarized.git
# 然後開啟 solarized/osx-terminal.app-colors-solarized/Solarized Dark ansi.terminal 配置檔案

安裝 autojump 外掛

brew install autojump # 確保有 brew 命令

編輯 ~/.zshrc 檔案

vim ~/.zshrc

plugins=(git brew laravel5 autojump)
[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh

安裝 zsh-autosuggestions 外掛

克隆原始碼

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

編輯 ~/.zshrc 檔案

vim ~/.zshrc

plugins=(git brew laravel5 autojump zsh-autosuggestions)

安裝 zsh-syntax-highlighting 外掛

克隆原始碼

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

編輯 ~/.zshrc 檔案

vim ~/.zshrc

plugins=(git brew laravel5 autojump zsh-autosuggestions zsh-syntax-highlighting)
source ~/.zshrc
本作品採用《CC 協議》,轉載必須註明作者和本文連結

相關文章