aboutsummaryrefslogtreecommitdiff
path: root/linux/home/.config/Code/User/snippets/snippet.code-snippets
blob: 16bdfede8475f49b4430506f7044da3540b834e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
{
    // Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
    // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
    // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
    // used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
    // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
    // Placeholders with the same ids are connected.
    // Example:
    "if name is main": {
        "scope": "python",
        "prefix": "ifn",
        "body": [
            "if __name__ == '__main__':",
            "\t$0"
        ],
        "description": ""
    },
    "for in": {
        "scope": "python",
        "prefix": "fori",
        "body": [
            "for ${1:item} in ${2:items}:",
            "\t$0"
        ],
        "description": ""
    },
    "for in range": {
        "scope": "python",
        "prefix": "forr",
        "body": [
            "for ${1:i} in range($2):",
            "\t$0"
        ],
        "description": ""
    },
    "lambda": {
        "scope": "python",
        "prefix": "lamb",
        "body": [
            "lambda ${1:arg} : $0",
        ],
        "description": ""
    },
    "map input": {
        "scope": "python",
        "prefix": "mapi",
        "body": [
            "map(${1:func}, input($2).split())"
        ],
        "description": ""
    },
    "html boiler plate": {
        "scope": "html",
        "prefix": "html",
        "body": [
            "<!DOCTYPE html>",
            "<html lang=\"en\">",
            "",
            "<head>",
            "  <meta charset=\"utf-8\">",
            "  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">",
            "",
            "  <title>${1:Basic HTML5}</title>",
            "  <meta name=\"author\" content=\"${2:Trevor Gray}\">",
            "  <meta name=\"description\" content=\"${3:HTML5 Template}\">",
            "",
            "  <meta property=\"og:title\" content=\"${4:HTML5 Template}\">",
            "  <meta property=\"og:type\" content=\"website\">",
            "  <meta property=\"og:url\" content=\"https://$5\">",
            "  <meta property=\"og:description\" content=\"${6:HTML5 Template}\">",
            "  <meta property=\"og:image\" content=\"${7:./assets/preview.png}\">",
            "",
            "  <link rel=\"icon\" href=\"${8:./assets/favicon.ico}\">",
            "  <link rel=\"icon\" href=\"${9:./assets/favicon.svg}\" type=\"image/svg+xml\">",
            "  <link rel=\"apple-touch-icon\" href=\"${10:./assets/apple-touch-icon.png}\">",
            "",
            "  <link rel=\"stylesheet\" href=\"${11:./css/style.css}\">",
            "",
            "</head>",
            "",
            "<body>",
            "  ${0:<!-- your content here... -->}",
            "  <script src=\"${12:./js/main.js}\" defer></script>",
            "</body>",
            "",
            "</html>",
        ],
        "description": ""
    },
    "css boiler plate": {
        "scope": "css",
        "prefix": "css",
        "body": [
            "html {",
            "  font-family: sans-serif;",
            "  font-size: 100%;",
            "  box-sizing: border-box;",
            "}",
            "",
            "*, ::before, ::after {",
            "  box-sizing: inherit;",
            "}",
            "",
            "html, body {",
            "  margin: 0;",
            "  padding: 0;",
            "  width: 100vw;",
            "  min-height: 100%;",
            "  text-rendering: optimizeLegibility;",
            "}",
            ""
        ]
    },
    "consoleLog": {
        "scope": "javascript",
        "prefix": "clg",
        "body": "console.log(${1:object});",
        "description": "Displays a message in the console"
    },
    "consoleLogObject": {
        "scope": "javascript",
        "prefix": "clo",
        "body": "console.log('${1:object} :>> ', ${1:object});",
        "description": "Displays an object in the console with its name"
    }
}