设置cursor、vscode的默认终端

一般来说设置为command 会比较好,比较方便和anaconda连用。但是正常来说默认是power shel,参考了别的帖子先用ctrl+shift+p调出命令输入settings json进入修改为:

{
    "terminal.integrated.profiles.windows": {
        "Command Prompt": {
            "path": "C:\\Windows\\System32\\cmd.exe"
        },
        "PowerShell": {
            "source": "PowerShell"
        },
        "Git Bash": {
            "path": "C:\\Program Files\\Git\\bin\\bash.exe",
            "args": ["--login", "-i"]
        },
        "WSL": {
            "path": "C:\\Windows\\System32\\wsl.exe"
        }
    },
    "terminal.integrated.defaultProfile.windows": "Command Prompt",
    "files.autoSave": "afterDelay"
}

即可,后面我像设置为某个虚拟环境,这样就不需要再选解释器了。

{
    "terminal.integrated.profiles.windows": {
        "Command Prompt": {
            "path": "C:\\Windows\\System32\\cmd.exe",
            "args": ["C:\\APP\\Anaconda\\Scripts\\activate.bat", "C:\\APP\\Anaconda\\envs\\openai"]
        },
        "PowerShell": {
            "source": "PowerShell"
        },
        "Git Bash": {
            "path": "C:\\Program Files\\Git\\bin\\bash.exe",
            "args": ["--login", "-i"]
        },
        "WSL": {
            "path": "C:\\Windows\\System32\\wsl.exe"
        }
    },
    "terminal.integrated.defaultProfile.windows": "Command Prompt",
    "files.autoSave": "afterDelay"
}

你要修改args里面设置为你的路径

你可能感兴趣的:(vscode,ide,编辑器)