2023年8月2日星期三

ubuntu下zsh的配置

安装zsh

sudo apt install zsh chsh -s /bin/zsh

安装oh my zsh

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

安装 Powerlevel10k主题

git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k 

  • 注意要下载字体,不然会乱码

    可以从https://www.nerdfonts.com/font-downloads下载,我下载的是Jetbrain的

    下载完把ttf文件安在/usr/share/fonts中

  • 然后在终端的preference里面选择字体。

  • 然后p10k configure

zsh配置插件

zsh-autosuggestions

git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

编辑 ~/.zshrc ,设置plugins

plugins=(zsh-autosuggestions git)

source ~/.zshrc

zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting

echo "source $ZSH_CUSTOM/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc

使插件生效

source ~/.zshrc

参考来源

作者:kk3909 链接:https://juejin.cn/post/6985123210782212132 来源:稀土掘金


没有评论:

发表评论

Powershell中python始终指向anaconda问题

 Powershell中python始终指向anaconda,即便修改Path也没有办法改变,这时候使用 conda config --show,查看auto_activate_base,发现是true,conda config --set auto_activate_base ...