zoukankan      html  css  js  c++  java
  • WSL 配置oh-my-zsh

    一、安装zsh

    # 安装
    sudo apt install zsh
    # 把默认的shell改成zsh
    chsh -s /bin/zsh
    

    二、安装oh-my-zsh

    # oh-my-zsh用于快速配置zsh
    sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
    

    三、安装必要插件

    # 安装zsh-syntax-highlighting语法高亮插件
    git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
    echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc
    source ~/.zshrc
    
    # 安装zsh-autosuggestions历史记录提示插件
    git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH/plugins/zsh-autosuggestions
    # 使用code ~/.zshrc编辑rc文件
    plugins=(git
             zsh-autosuggestions)
    ...
    source $ZSH/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
    source ~/.zshrc
    

    四、设置主题

    # clone并安装oh-my-zsh-powerline-theme
    git clone git://github.com/jeremyFreeAgent/oh-my-zsh-powerline-theme
    cd ./oh-my-zsh-powerline-theme
    ./install_in_omz.sh
    # 编辑.zshrc的主题设置
    code ~/.zshrc
    # ZSH_THEME="robbyrussell"
    ZSH_THEME="powerline"
    

    五、配置git

    # 配置git默认编辑器
    git config --global core.editor code
    

    六、卸载

    sudo sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/uninstall.sh)"
    
  • 相关阅读:
    [C#1] 2类型基础
    [C#2] 5迭代器
    [C#1] 6方法
    [C#1] 8数组
    [C#1] 12特性
    [C#1] 10事件
    [C#2] 2匿名方法
    实用代码JavaScript实用小函数一枚(深入对象取值)
    [C#1] 11接口
    实用代码C#获取本机网络适配器信息及MAC地址
  • 原文地址:https://www.cnblogs.com/linxmouse/p/13354031.html
Copyright © 2011-2022 走看看