乐趣区

关于iterm2:快速配置-iTerm2GitNode

iTerm2+Git+Node 配置

iTerm2 配置

  1. 装置 iTerm2
  2. 配置主题 oh-my-zsh

    sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  3. 主动高亮插件

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

vi ~/.zshrc 并增加到最初:

source ~/.oh-my-zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

保留退出并执行 source ~/.zshrc

  1. 主动补全插件

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

    vi ~/.zshrc 并批改

    plugins=(zsh-autosuggestions git)

    保留退出并执行 source ~/.zshrc

配置默认文件夹
iTerm2->Preferences->Profiles->General->Working Directory->Directory 输出默认文件夹门路

Git 配置

  1. 装置 Homebrew

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  2. 装置 Git

    brew install git
  3. 配置 user.name 和 user.email

    git config --global user.name "username"
    git config --global user.email "useremail"
  4. 配置 alias 节省时间

    git config --global alias.st status
    git config --global alias.co checkout
    git config --global alias.ci commit
    git config --global alias.br branch
    git config --global alias.pl pull
    git config --global alias.ps push

Node 配置

  1. 下载 Node 并装置:https://nodejs.org/
  2. 配置淘宝镜像源

    npm config set registry https://registry.npm.taobao.org
  3. [可选] 装置 node 版本管理工具 nvm:https://github.com/nvm-sh/nvm
  4. [举荐] 装置 yarn

    brew install yarn
退出移动版