pawelgrzybek / snippet-generator

Snippet generator for Visual Studio Code, Sublime Text and Atom
https://snippet-generator.app/
1.74k stars 202 forks source link

Snippets for jupyter/anaconda notebook #88

Open ZenithClown opened 1 year ago

ZenithClown commented 1 year ago

Hi, jupyter or anaconda notebook supports snippets using nbextensions and follows a similar structure like vs code. However, this does not support a placeholder as of now. Can we feature engineer this?

Structure for jupyter:

{
  "snippets" : [
    {
      "name" : "example",
      "code" : [
        "# This is an example snippet!",
        "# To create your own, add a new snippet block to the",
        "# snippets.json file in your jupyter nbextensions directory:",
        "# /nbextensions/snippets/snippets.json",
        "# `jupyter --data-dir` prints the working directory",
        "import this"
      ]
    },

    {
      "name" : "new-example",
      "code" : [
        "# This is a new example snippet!",
        "import new"
      ]
    }
  ]
}