zoukankan      html  css  js  c++  java
  • VSCode用以Python开发的配置 | VSCode

    VSCode编辑器实用插件

    配置:
    {
        "workbench.startupEditor": "newUntitledFile",
        "editor.minimap.enabled": false,
        "debug.inlineValues": true,
        "files.autoSave": "afterDelay",
        "python.terminal.executeInFileDir": true,
        "editor.maxTokenizationLineLength": 100000,
        "workbench.list.openMode": "doubleClick",
        "python.formatting.provider": "none",
        "scm.autoReveal": false,
        "debug.console.fontSize": 11.7,
        "debug.internalConsoleOptions": "neverOpen",
        "terminal.integrated.fontSize": 11.7,
        "explorer.autoReveal": false,
        "[python]": {
            "editor.defaultFormatter": "ms-python.python"
        },
        "[html]": {
            "editor.defaultFormatter": "HookyQR.beautify"
        },
        "workbench.editorAssociations": {
            "*.ipynb": "jupyter-notebook"
        },
        "notebook.cellToolbarLocation": {
            "default": "right",
            "jupyter-notebook": "left"
        },
        "workbench.iconTheme": "webstorm-icons",
        "scm.inputFontSize": 11.7,
        "markdown.preview.fontSize": 11.7,
        "explorer.confirmDelete": false,
        "editor.fontSize": 11.7,
        "editor.matchBrackets": false,
        "[json]": {
            "editor.defaultFormatter": "HookyQR.beautify"
        },
        "terminal.integrated.cursorStyle": "line",
        "terminal.integrated.tabs.focusMode": "singleClick",
        "terminal.integrated.inheritEnv": false,
        "editor.suggestSelection": "first",
        "files.exclude": {
            "**/.classpath": true,
            "**/.project": true,
            "**/.settings": true,
            "**/.factorypath": true
        },
        "python.showStartPage": false,
        "redhat.telemetry.enabled": false,
        "[javascript]": {
            "editor.defaultFormatter": "HookyQR.beautify"
        },
        "workbench.colorTheme": "Ultraedit Light",
        "python.languageServer": "Pylance",
        "python.analysis.completeFunctionParens": true,
        "window.zoomLevel": -1,
        "pyqt-integration.pyuic.cmd": "/opt/anaconda3/envs/qt_py36/bin/pyuic5",
        "pyqt-integration.qtdesigner.path": "/opt/anaconda3/envs/qt_py36/bin/",
        "tabnine.experimentalAutoImports": true,
        "editor.renderIndentGuides": false,
        "python.autoComplete.extraPaths": [
        ],
    }
    - 重点配置:在Scrapy或者Django项目中,单独执行某一个脚本,但需要导入项目中其他模块的对象,报错:ModuleNotFoundError
      + 需要在脚本执行前将当前workspace加入到python解释器可以读取的环境变量中
      + 措施:配置launch.json参数:
    "env": {"PYTHONPATH": "${workspaceRoot}"}
    {
        "configurations": [{
            "name": "Py: 当前文件",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "env": {"PYTHONPATH": "${workspaceRoot}"},
            "console": "integratedTerminal"
        }]
    }
    
    
    
    记录自己的学习历程!
  • 相关阅读:
    洛谷 P1278 单词游戏 【状压dp】
    洛谷 P1854 花店橱窗布置 【dp】
    洛谷 P2258 子矩阵
    洛谷 P3102 [USACO14FEB]秘密代码Secret Code 【区间dp】
    洛谷U14200 Changing 题解 【杨辉三角】
    洛谷P3933 Chtholly Nota Seniorious 【二分 + 贪心 + 矩阵旋转】
    P3932 浮游大陆的68号岛 【线段树】
    洛谷P1273 有线电视网 【树上分组背包】
    NOI2013 矩阵游戏 【数论】
    洛谷P1268 树的重量 【构造 + 枚举】
  • 原文地址:https://www.cnblogs.com/pymkl/p/12811574.html
Copyright © 2011-2022 走看看