美文网首页
win10 wls 2 配置 oh-my-zsh (常用插件安

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

作者: mudssky | 来源:发表于2022-04-22 12:22 被阅读0次

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

    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

    相关文章

      网友评论

          本文标题:win10 wls 2 配置 oh-my-zsh (常用插件安

          本文链接:https://www.haomeiwen.com/subject/uwdvertx.html