oh-my-zsh

所有网站都已经换成国内镜像

一、安装

        安装oh-my-zsh前需要安装zsh,linux默认shell一般是bash

// 输出默认shell
echo $SHELL

// 下载zsh
apt-get update
apt-get install zsh

chsh -s /bin/zsh

         更改完shell重新打开即可应用,接下来就是开安装oh-my-zsh

wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh

// 添加权限
chmod +x install.sh

// 更改镜像
vim install.sh
... (修改以下参数为)
REPO=${REPO:-mirrors/oh-my-zsh}
REMOTE=${REMOTE:-https://gitee.com/${REPO}.git}
....

// 执行安装
./install.sh

二、插件

        更改主题

        更改配置文件并更新即可,不知道设置什么主题,可以将主题设置为"random",表示每次打开shell都会是随机主题,遇到自己喜欢的,再更改为对应名字。

vim ~/.zshrc
...
ZSH_THEME = "random"
...
source ~/.zshrc

         每次打开随机主题的名字

        高亮 zsh-syntax-highlighting

 git clone 下载插件到指定位置

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

 更改配置文件,在plugins参数内添加zsh-syntax-highlighting(如下图),添加完毕后更新配置

vim ~/.zshrc
...
plugins = ( 其他插件 zsh-syntax-highlighting)
...
source ~/.zshrc

 

        代码补全 zsh-autosuggestions

git clone 下载插件到指定位置

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

更新配置文件,在 plugins参数内添加zsh-autosuggestions

vim ~/.zshrc
...
plugins = (其他插件 zsh-autosuggestions)
...
source ~/.zshrc

三、可能遇到的问题

         安装wget(建议安装前,liunx已经换源)

apt-get update
apt-get install wget

        git clone 源失效

      可以在gitee网站搜索对应的镜像仓库,只需要把网站更换即可 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值