繁体   English   中英

Visual Studio 代码、PowerShell 和 Git Bash

[英]Visual Studio Code, PowerShell, and Git Bash

我一直在尝试将 VSCode 配置为使用 GitBash 作为集成终端。 但是,无论我尝试什么,集成终端始终显示为 PowerShell。 我已禁用 PowerShell,卸载 Windows 终端和 Windows 终端预览。 这是我的设置。json:

{
    "sync.gist": "16ea877040ee819fae27275ae71be30b",
    "sync.quietSync": true,
    "workbench.iconTheme": "material-icon-theme",
    "editor.minimap.enabled": false,
    "workbench.colorCustomizations": {
        "editorGutter.background": "#30208b",
        "statusBar.background": "#1b5c12",
        "statusBar.debuggingBackground": "#1b5c12",
        "statusBar.noFolderBackground": "#1b5c12",
        "statusBar.border": "#ff0000"
    },
    "python.autoComplete.addBrackets": true,
    "python.dataScience.themeMatplotlibPlots": true,
    "python.linting.pylamaEnabled": true,
    "python.linting.pycodestyleEnabled": true,
    "git.autofetch": true,
    "python.pythonPath": "/usr/bin/python3",
    "code-runner.respectShebang": false,
    "code-runner.fileDirectoryAsCwd": true,
    "code-runner.runInTerminal": true,
    "editor.fontSize": 12,
    "editor.fontFamily": "'Aurulent Sans Mono Regular','Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
    "editor.formatOnSave": true,
    "editor.formatOnType": true,
    "editor.formatOnPaste": true,
    "prettier.printWidth": 120,
    "prettier.singleQuote": true,
    "prettier.tabWidth": 4,
    "prettier.jsxSingleQuote": true,
    "prettier.jsxBracketSameLine": true,
    "browser-preview.startUrl": "http://127.0.0.1:8000/",
    "browser-preview.verbose": false,
    "python.linting.pylintArgs": ["--extension-pkg-whitelist=PyQt5"],
    "[python]": {
        "editor.defaultFormatter": "iansan5653.format-python-docstrings"
    },
    "explorer.confirmDragAndDrop": false,
    "explorer.confirmDelete": false,
    "git.enableSmartCommit": true,
    "files.associations": {
        "**/*.html": "html",
        "**/templates/**/*.html": "django-html",
        "**/templates/**/*": "django-txt",
        "**/requirements{/**,*}.{txt,in}": "pip-requirements"
    },
    "terminal.integrated.fontFamily": "'Fira Code Medium'",
    "terminal.integrated.fontSize": 12,
    "terminal.integrated.inheritEnv": true,
    "#terminal.integrated.defaultProfile.osx#": "C:\\Windows\\System32\\cmd.exe",
    "#terminal.integrated.defaultProfile.windows": "C:\\Windows\\System32\\cmd.exe",
    "terminal.integrated.cwd": "C:\\Users\\DawsonSchaffer\\Documents\\Projects",
    "workbench.colorTheme": "Monokai",
    "workbench.editorAssociations": [

        {
            "viewType": "jupyter.notebook.ipynb",
            "filenamePattern": "*.ipynb"
        }
    ],
    "terminal.integrated.profiles.windows": {
        "Git Bash": {
            "source": "Git Bash",
            "path": "C:\\Program Files\\Git\\git-bash.exe",
        }
    },
    "terminal.integrated.defaultProfile.windows": "Git Bash",
    "python.analysis.completeFunctionParens": true,
    "settingsSync.ignoredSettings": [
        "terminal.external.windowsExec"
    ],
    "terminal.explorerKind": "external",
}

任何帮助找到解决方案将不胜感激。

谢谢道森

作为临时解决方法,您可以使用已弃用的设置:“terminal.integrated.shell.windows”:“C:\Program Files\Git\bin\bash.exe”

我终于使用以下方法让它工作:

"terminal.integrated.profiles.windows": {
    "Git Bash": {
        "source": "Git Bash",
        "path": "C:\\Program Files\\Git\\git-bash.exe",
        "icon": "C:\\Program Files\\gitbash.png"
    }
},
"terminal.integrated.defaultProfile.windows": "Git Bash",

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM