mac系统vscode环境配置,以及iTerm2配置Zsh + on-my-zsh shell

https://segmentfault.com/a/1190000013612471?utm_source=tag-newesthtml

https://ohmyz.sh/node

 一:安装iTerm2终端linux

 https://www.iterm2.com/downloads.htmlgit

1:查看当前的shell环境github

echo $SHELL

2: 查看系统自带哪些shelltypescript

cat /etc/shells

3:切换Zsh shellshell

chsh -s /bin/zsh
# Mac以下
# 在 /etc/shells 文件中加入以下一行
/usr/local/bin/zsh
# 接着运行
chsh -s /usr/local/bin/zsh

 自动安装oh-my-zsh 插件npm

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

 

重启iTerm2终端vim

效果segmentfault

 

二:vscode中配置shell

 

vscode中字体及颜色的配置:

{
    "editor.fontSize": 14,
    "editor.tabSize": 2,
    "workbench.colorTheme": "Monokai",
    "workbench.startupEditor": "newUntitledFile",
    "window.zoomLevel": 1,
    "typescript.check.npmIsInstalled": false,
    "extensions.ignoreRecommendations": true,
    "git.ignoreMissingGitWarning": true,
    "gitlens.advanced.messages": {
        "suppressShowKeyBindingsNotice": true
    },
    "terminal.integrated.shell.linux": "/bin/zsh",
    "terminal.integrated.shell.osx": "/bin/zsh"
}

效果:

 

重启电脑后发现node,nvm命令都没法识别。

Mac使用zsh shell致使mvn命令无效的解决方案:

一、编辑 .zshrc 文件

vim ~/.zshrc

二、而后在.zshrc文件末尾加上

source ~/.bash_profile

保存退出

三、让配置文件修改后生效,执行如下命令

source ~/.bash_profile

这样node,nvm命令就能够识别了。

相关文章
相关标签/搜索