mac 安装iTerm2
- 1 下载 iTerm2
iTerm官方地址 可以使用brew install wget 安装wget
- 2 安装ohmyzsh
- 3 配置nvm
//修改 ~/.zshrc
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
-
4 修改主题 修改 ~/.zshrc
ZSH_THEME="agnoster" -
5 隐藏命令中的用户名 user就是设置的用户名 修改 ~/.zshrc
DEFAULT_USER="user" -
6 字体需要安装fonts-powerline
- 7 安装插件
修改 ~/.zshrc 需要source ~/.zshrc 生效配置文件 如果报/usr/local/share/zsh和/usr/local/share/zsh/site-functions权限 尝试
chmod 755 /usr/local/share/zsh
chmod 755 /usr/local/share/zsh/site-functions
plugins=(git autojump colorize zsh-syntax-highlighting zsh-autosuggestions git-open)
zsh-syntax-highlighting(高亮命令)
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting\n
zsh-autosuggestions(补全命令)
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions\n
git-open(在终端里打开当前项目的远程仓库地)
git clone https://github.com/paulirish/git-open.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/git-open\n
autojump(目录之间跳转)
brew install autojump
git(默认支持) colorize(github.com/ohmyzsh/ohm…)
- 8 vscode配置位置shell(setting.json)
"terminal.integrated.automationShell.linux": "/Applications/iTerm.app"