zoukankan      html  css  js  c++  java
  • mac系统vscode环境配置,以及iTerm2配置Zsh + on-my-zsh shell

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

    https://ohmyz.sh/

     一:安装iTerm2终端

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

    1:查看当前的shell环境

    echo $SHELL

    2: 查看系统自带哪些shell

    cat /etc/shells

    3:切换Zsh shell

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

     自动安装oh-my-zsh 插件

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

    重启iTerm2终端

    效果

    二: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命令无效的解决方案:

    1、编辑 .zshrc 文件

    vim ~/.zshrc

    2、然后在.zshrc文件末尾加上

    source ~/.bash_profile

    保存退出

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

    source ~/.bash_profile

    这样node,nvm命令就可以识别了。

  • 相关阅读:
    Log4j---文件解析以及语法使用
    Sessions 与Cookies详解
    Web三大组件之控制器组件Servlet(转载)
    单向链表和双向链表
    单向队列和环形队列
    稀疏数组
    XML解析器之JAXP与DOM4J
    DTD约束与schema约束的不同
    XML之基础和DTD解析
    数据库----SQL基本查询
  • 原文地址:https://www.cnblogs.com/Joans/p/10430781.html
Copyright © 2011-2022 走看看