配置適合自己的終端(iterm2 + Oh My Zsh)

1, 下載item2

地址: https://iterm2.com/

2, 下載 Oh My Zsh

終端輸入:

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

3,配置當前最流行

終端輸入:

git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k

cmd + shift + . 打開 mac用戶路徑下的隱藏文件 .zshrc 打開并配置

ZSH_THEME="powerlevel10k/powerlevel10k"

常用插件

1 autojump

通過 j + 項目名字 直接跳轉(zhuǎn)到對應的目錄,不再需要 cd文件路徑

brew install autojump

上文 .zshrc文件配置

plugins=(
 git
 autojump
  )
2 zsh-autosuggestions

配置自動補全代碼功能
終端輸入:

github源數(shù)據(jù)
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

github報錯用下面的方案
git clone https://gitee.com/phpxxo/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

上文 .zshrc文件配置

plugins=(
 git
 zsh-autosuggestions
  )
3 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文件配置

plugins=(
 git
 zsh-syntax-highlighting
  )

最終完整地 .zshrc文件下 plugins文件地適配應該是

plugins=(
  git
  autojump
  zsh-syntax-highlighting
  zsh-autosuggestions
)
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容