iTerm2+Git+Node 配置
iTerm2 配置
- 装置 iTerm2
-
配置主题 oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
-
主动高亮插件
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
-
主动补全插件
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 配置
-
装置 Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
-
装置 Git
brew install git
-
配置 user.name 和 user.email
git config --global user.name "username" git config --global user.email "useremail"
-
配置 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 配置
- 下载 Node 并装置:
https://nodejs.org/
-
配置淘宝镜像源
npm config set registry https://registry.npm.taobao.org
- [可选] 装置 node 版本管理工具 nvm:
https://github.com/nvm-sh/nvm
-
[举荐] 装置 yarn
brew install yarn