abulka / vscode-snippet-creator

An extension to simplify the snippet creation
11 stars 2 forks source link

Extension should insert `\t` instead of real tabs #6

Open zardoy opened 3 years ago

zardoy commented 3 years ago

Related https://github.com/abulka/vscode-snippet-creator/issues/2

Extension just refuses to insert \t just try to use snippet from the issue above and then create snippet from that inserted content. Extension will generate this:

{
    "test": {
        "prefix": "test",
        "body": [
            "{",
            "    \"name\": \"Launch CURRENT Program\",",
            "    \"program\": \"file\",",
            "    \"cwd\": \"fileDirname\",",
            "    \"request\": \"launch\",",
            "    \"skipFiles\": [",
            "        \"<node_internals>/**\"",
            "    ],",
            "    \"type\": \"pwa-node\"",
            "},"
        ],
        "description": "description for test"
    },
}

But should instead generate this:

{
    "test1": {
        "prefix": "test1",
        "body": [
            "{",
            "\t\"name\": \"Launch CURRENT Program\",",
            "\t\"program\": \"file\",",
            "\t\"cwd\": \"fileDirname\",",
            "\t\"request\": \"launch\",",
            "\t\"skipFiles\": [",
            "\t\t\"<node_internals>/**\"",
            "\t],",
            "\t\"type\": \"pwa-node\"",
            "},"
        ],
        "description": "description for test1"
    }
}