Mac下iTerm2 + Oh My Zsh配置個性化終端
引用:
http://www.itdecent.cn/p/ba08713c2b19
https://www.iterm2.com/index.html
-
效果

-
介紹
-
iTerm2
iTerm2是terminal的替代品,內(nèi)置很多豐富的功能,比如窗口分割、熱鍵、搜索、密碼管理等,讓你在使用中的體驗(yàn)更友好,效率更快。
更多功能可以查看這里
https://www.iterm2.com/features.html -
Oh My Zsh
Oh My Zsh是一個zsh的管理配置工具,可以讓你在zsh中輕松的配置各種插件,比如布局、高亮、自動填充等
更多插件可以查看這里
https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
-
-
下載安裝
官方地址
https://www.iterm2.com/下載地址
https://www.iterm2.com/downloads.html雙擊解壓 運(yùn)行iTerm程序,根據(jù)提示選擇將文件拷貝到application中,或者brew install iterm2-
配置顏色字體等
-
顏色
iTerm2->Perferences->Profiles->Colors->Color Presets->Solarized Dark -
字體(主題插件安裝完成之后再配置字體)
iTerm2->Perferences->Profiles->Text->Font->MesloLGS NF -
新窗口路徑與上一個窗口路徑一致
iTerm2->Perferences->Profiles->General->Working Directory->Reuse previous session's directory
-
-
安裝Oh My Zsh
官方地址
https://github.com/ohmyzsh/ohmyzsh-
curl方式安裝
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
-
-
安裝powerlevel10k主題插件
官方地址
https://github.com/romkatv/powerlevel10kOh My Zsh方式安裝-
下載文件到Oh My Zsh插件庫
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k -
編輯~/.zshrc文件
ZSH_THEME="powerlevel10k/powerlevel10k" 修改字體為
MesloLGS NF重啟iTerm2
-
如果配置窗口沒有提示,使用以下命令
p10k configure
-
-
安裝高亮顯示插件
官方地址
https://github.com/zsh-users/zsh-syntax-highlightingOh My Zsh方式安裝-
下載文件到Oh My Zsh插件庫
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting -
編輯~/.zshrc文件,plugins增加zsh-syntax-highlighting插件
plugins=( [plugins...] zsh-syntax-highlighting)
-
-
安裝自動填充建議插件
官方地址
https://github.com/zsh-users/zsh-autosuggestionsOh My Zsh方式安裝-
下載文件到Oh My Zsh插件庫
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions -
編輯~/.zshrc文件,plugins增加zsh-autosuggestions插件
plugins=(zsh-autosuggestions)
-