配置远程主机的 Visual Studio Code 设置
在远程主机的 ~/.vscode-server/data/Machine/settings.json 中,添加你的配置。
Python
{
"python.condaPath": "/path/to/conda",
"python.defaultInterpreterPath": "/path/to/python"
}
Remote SSH
有时候会遇到服务器更新 VS Code / 插件速度很慢的情况,可以启用下面两个选项以在本地下载并上传到服务器:
{
"remote.SSH.localServerDownload": "always",
"remote.downloadExtensionsLocally": true
}
Terminal
{
"terminal.integrated.profiles.linux": {
"bash": {
"path": ["/usr/bin/bash", "bash"],
"args": ["--rcfile", "/path/to/bashrc"],
"icon": "terminal-bash"
},
"zsh": {
"path": ["/usr/bin/zsh", "zsh"]
},
"tmux": {
"path": "tmux",
"icon": "terminal-tmux"
}
},
"terminal.integrated.defaultProfile.linux": "zsh"
}
Proxy
{
"http.proxy": "http://127.0.0.1:7890",
"http.proxyStrictSSL": true
}
Editor
在 ~/.bashrc 中,添加:
if [ "$VSCODE_INJECTION" = "1" ]; then
export EDITOR="code --wait"
fi

浙公网安备 33010602011771号