// 将设置放入此文件中以覆盖默认设置 { "python.pythonPath": "/usr/local/bin/python3.7 -m pipenv run python3", "code-runner.executorMapByFileExtension": { ".nim": "/Users/shaohy/.nimble/bin/nim c -r", }, "window.zoomLevel": 2, "explorer.confirmDelete": false, "search.location": "panel", "workbench.colorTheme": "Monokai", //"python.venvPath": "/Users/shaohy/.local/share/virtualenvs/" "workbench.colorCustomizations": { "tab.activeBackground": "#dd4e23", "tab.activeForeground": "#ccffff", // 标签字体颜色 }, "workbench.statusBar.feedback.visible": false, "code-runner.runInTerminal": true, "code-runner.saveAllFilesBeforeRun": true, "code-runner.saveFileBeforeRun": true, "code-runner.executorMap": { "python": "$pythonPath -u $fullFileName", }, "python.formatting.provider": "yapf", "python.formatting.yapfArgs": [ "--style", "{based_on_style: chromium, indent_width: 2}" ], "git.ignoreMissingGitWarning": true, "vsicons.dontShowNewVersionMessage": true, "editor.suggestSelection": "first", "editor.renderWhitespace":"all", "editor.tabSize": 2, }
{ "workbench.colorTheme": "Default Dark+", "editor.suggestSelection": "first", "code-runner.executorMapByGlob": { "*.nim": "nim c -r", "*.py": "/usr/local/bin/pipenv run python" }, "python.pythonPath": "/usr/local/bin/pipenv run python", "editor.tabSize": 2, "editor.fontSize": 14, "files.autoSave": "onWindowChange", "editor.renderWhitespace": "boundary", "editor.cursorStyle": "block" }
{ "python.pythonPath": "/usr/local/bin/python3", "code-runner.executorMap": { "nim": "/Users/shaohy/.nimble/bin/nim c -r", "python": "/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -u", "julia":"/Applications/Julia-1.4.app/Contents/Resources/julia/bin/julia" }, "editor.tabSize": 2 }
* Ctrl + Shift + P 调用命令行 * Python: Create Environment虚拟环境
在当前文件夹新建终端并输入以下命令:
python -m venv .venv .venv/Scripts/Activate.ps1 # windows source .env/Scripts/activate # linux
最后再选择一下虚拟环境中的解释器
python: select interpreter
* Ctrl + Shift + P 调用命令行 * 选择 Git: Clone command * 从远程Github源克隆
提交并推送:即把本地工作区的修改(包括添加、删除)提交到本地仓库然后再推送给远程仓库
提交并同步:首先vs会提交本地工作区的修改到本地仓库,然后会执行一次拉取(会自动合并本地仓库和远程仓库),最后推送本地仓库到远程仓库。
安装插件之后,在 Ctrl+Shift+P (或 F1) 输入 * Ftp-sync: Init *,配置服务器账号路径等信息。
{ "remotePath": "/root/python/", "host": "192.168.12.10", "username": "root", "password": "password", "port": 65422, "secure": false, "protocol": "sftp", "uploadOnSave": false, "passive": false, "debug": false, "privateKeyPath": "/Users/apple/.ssh/hzup_key", "passphrase": null, "ignore": [ "\\.vscode", "\\.git", "\\.DS_Store" ], "generatedFiles": { "uploadOnSave": false, "extensionsToInclude": [], "path": "" } }
通过命令同步服务器端和客户端的文件。
Ftp-sync: Sync Local to Remote Ftp-sync: Sync Remote to Local