Linux终端配置 - ohmyzsh
条评论插件安装
方法一
将当前目录切换到ohmyzsh的plugins
文件夹
1 | cd ~/.oh-my-zsh/custom/plugins |
- 语法高亮 zsh-syntax-highlighting
1
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
- 自动提示 zsh-autosuggestions
1
git clone https://github.com/zsh-users/zsh-autosuggestions
插件安装成功后需要在zsh的配置文件中将其激活,在终端执行以下命令以编辑zsh-shell
的资源文件
1 | vim ~/.zshrc |
在里面找到并修改ZSH_THEME="ys"
和plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
方法二
如果具有管理员权限,则可以使用apt
安装插件
1 | sudo apt install zsh-syntax-highlighting |
在~/.zshrc
文件末尾添加插件激活命令
1 | . /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh |
安装 autojump
autojump
用来快读跳转到某个文件夹
1 | sudo yum install autojump # yum in CentOS |
在~/.zshrc
文件末尾加上. /usr/share/autojump/autojump.zsh
以激活 autojump
终端异常
1 | compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew_services |
Type brew cleanup
in terminal to solve it.
- 本文链接:https://blog.charjin.top/2022/12/01/linux/oh-my-zsh/
- 版权声明:本博客所有文章除特别声明外,均采用 CC BY-NC-SA 3.0 CN 许可协议。转载请注明出处!
分享