Skip to content

Configure VSCode snippet (Workspace scope)

VsCode config

Create the vscode template of your favorite language.

Inside .vscode create an <language>.code-snippets (ex: python.code-snippets)

And create you snippets

json
{
  "pythonheader": {
    "prefix": "python_header",
    "body": ["# Built-in", "", "# Third-party", "", "# Local", ""],
    "description": ""
  }
}

Auto snippet

Inside your extensions.json add "Gruntfuggly.auto-snippet" them. inside you settings.json add :

json
  "autoSnippet.snippets": [{ "pattern": "**/*.py", "snippet": "pythonheader" }],

Now if you create a new .py file you should have your snippet.