这几个插件,让你的 vscode更牛逼

5,398 阅读1分钟

原文:10 Visual Studio Code extensions for Python development

主要是 Python 开发使用到的。

GIT

GitLens — Git supercharged

只能说炒鸡强大,没有什么可以赘述的了。

Git Blame

能够查出那段代码是谁写的,方便撕逼。

Python

Python by Microsoft

官方出品。

autoDocstring

为你快速生成 doc string。

Code Runner

支持多种语言,包括 Python,运行执行一段任意代码。

Djaneiro

django 代码片段,比如输入Model就能联想出:

class MODELNAME(models.Model):
    """Model definition for MODELNAME."""

    # TODO: Define fields here

    class Meta:
        """Meta definition for MODELNAME."""

        verbose_name = 'MODELNAME'
        verbose_name_plural = 'MODELNAMEs'

    def __str__(self):
        """Unicode representation of MODELNAME."""
        pass

flask-snippets

针对 flask 的 code snippets。

linting

pip install pylint pylint_django

然后还需要修改一下 vscode 的配置:

"python.linting.pylintArgs": [
        "--load-plugins=pylint_django"
]

其他

Trailing Spaces

自动删除Trailing SpacesTrailing Spaces就是一行最后一个非空字符后的空格。

Better Comments

帮助你更好地编写注释。