Public
Authored by 胡小根

毫末科技.zshrc配置

  1. 简化日常操作命令;
  2. 让zsh更加强大;
  3. 方便公司内部的一些常操作;

安装oh-my-zsh的脚本见附件install.zsh.sh

Edited
.zshrc 1.24 KB
  • 推荐安装cgit,替代git命令,可以直接clone github.com加速

    cd ~/.oh-my-zsh/custom/plugins/
    git clone https://github.com/zsh-users/zsh-autosuggestions.git
    git clone https://github.com/zsh-users/zsh-syntax-highlighting.git

    然后在~/.zshrc中修改:

    plugins=(
      git
      zsh-autosuggestions
      zsh-syntax-highlighting
    )
    Edited by 胡小根
  • 解决黏贴很慢的问题:修改 ~/.zshrc,增加以下内容

    pasteinit() {
      OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
      zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
    }
    
    pastefinish() {
      zle -N self-insert $OLD_SELF_INSERT
    }
    zstyle :bracketed-paste-magic paste-init pasteinit
    zstyle :bracketed-paste-magic paste-finish pastefinish
    Edited by 胡小根
  • 安装oh-my-zsh的脚本:install.zsh.sh

Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment