vscode python开发基本配置

1. 代码提示

pip安装pylint、flake8、pylint-django
setting.json配置如下:

"python.linting.flake8Enabled": true,
    "python.linting.flake8Args": [
        "--max-line-length=120"
    ],
    "python.linting.pylintArgs": [
        "--load-plugins=pylint_django"
    ]

2. 远程开发和部署

1. Remote - SSH

用来远程连接到服务器,相当于直接把服务器上的文件用本地的vscode打开,直接进行编辑

2. SFTP

自己常用的模式,可以同步代码local-->remote或remote-->local。我一般喜欢在开发本地的项目,修改代码后先同步到remote,然后在remote上测试没问题的话再git提交。

{
    "name": "32",
    "host": "",
    "password": "",
    "protocol": "sftp",
    "port": 3222,
    "username": "bfd",
    "remotePath": "/opt/qa",
    "uploadOnSave": false,
    "syncMode": "update",
    "ignore": [
        "**/.vscode/**",
        "**/.git/**",
        "**/.idea/**"
    ]
}

你可能感兴趣的:(vscode python开发基本配置)