win10 wls 2 配置 oh-my-zsh (常用插件安

2022-04-22  本文已影响0人  mudssky

执行官方提供的命令一键安装

Method Command
curl sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
wget sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fetch sh -c "$(fetch -o - https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

然后我们修改配置文件进行配置

vi ~/.zshrc

修改zsh的主题为random,这样每次启动随机主题,方便自己找到喜欢的主题。

ZSH_THEME="random"

安装插件

github上面有zsh的插件列表 https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins

同样在zshrc里面修改

plugins=(
        autojump
        extract # 解压缩
        git
        rand-quote # 随机展示格言
        vi-mode
        zsh-syntax-highlighting
        zsh-autosuggestions
        )

有些插件需要安装

zsh-syntax-highlighting 安装

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

zsh-autosuggestions

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

autojump可以用包管理器安装,

因为我这个是ubuntu的系统

所以

sudo apt-get install autojump

也可以手动安装

git clone git://github.com/wting/autojump.git
cd autojump
./install.py or ./uninstall.py

改完配置以后,运行一下

source ~/.zshrc

上一篇下一篇

猜你喜欢

热点阅读