|
2 | 2 | "if": { |
3 | 3 | "prefix": "if", |
4 | 4 | "body": [ |
5 | | - "if ${expression}:", |
6 | | - "\t${pass}" |
| 5 | + "if ${1:expression}:", |
| 6 | + "\t${2:pass}" |
7 | 7 | ], |
8 | 8 | "description": "Code snippet for an if statement" |
9 | 9 | }, |
10 | 10 | "if/else": { |
11 | 11 | "prefix": "if/else", |
12 | 12 | "body": [ |
13 | | - "if ${condition}:", |
14 | | - "\t${1:pass}", |
| 13 | + "if ${1:condition}:", |
| 14 | + "\t${2:pass}", |
15 | 15 | "else:", |
16 | | - "\t${2:pass}" |
| 16 | + "\t${3:pass}" |
17 | 17 | ], |
18 | 18 | "description": "Code snippet for an if statement with else" |
19 | 19 | }, |
20 | 20 | "elif": { |
21 | 21 | "prefix": "elif", |
22 | 22 | "body": [ |
23 | | - "elif ${expression}:", |
24 | | - "\t${pass}" |
| 23 | + "elif ${1:expression}:", |
| 24 | + "\t${2:pass}" |
25 | 25 | ], |
26 | 26 | "description": "Code snippet for an elif" |
27 | 27 | }, |
28 | 28 | "else": { |
29 | 29 | "prefix": "else", |
30 | 30 | "body": [ |
31 | 31 | "else:", |
32 | | - "\t${pass}" |
| 32 | + "\t${1:pass}" |
33 | 33 | ], |
34 | 34 | "description": "Code snippet for an else" |
35 | 35 | }, |
36 | 36 | "while": { |
37 | 37 | "prefix": "while", |
38 | 38 | "body": [ |
39 | | - "while ${expression}:", |
40 | | - "\t${pass}" |
| 39 | + "while ${1:expression}:", |
| 40 | + "\t${2:pass}" |
41 | 41 | ], |
42 | 42 | "description": "Code snippet for a while loop" |
43 | 43 | }, |
44 | 44 | "while/else": { |
45 | 45 | "prefix": "while/else", |
46 | 46 | "body": [ |
47 | | - "while ${expression}:", |
48 | | - "\t${1:pass}", |
| 47 | + "while ${1:expression}:", |
| 48 | + "\t${2:pass}", |
49 | 49 | "else:", |
50 | | - "\t${2:pass}" |
| 50 | + "\t${3:pass}" |
51 | 51 | ], |
52 | 52 | "description": "Code snippet for a while loop with else" |
53 | 53 | }, |
54 | 54 | "for": { |
55 | 55 | "prefix": "for", |
56 | 56 | "body": [ |
57 | | - "for ${target_list} in ${expression_list}:", |
58 | | - "\t${pass}" |
| 57 | + "for ${1:target_list} in ${2:expression_list}:", |
| 58 | + "\t${3:pass}" |
59 | 59 | ], |
60 | 60 | "description": "Code snippet for a for loop" |
61 | 61 | }, |
62 | 62 | "for/else": { |
63 | 63 | "prefix": "for/else", |
64 | 64 | "body": [ |
65 | | - "for ${target_list} in ${expression_list}:", |
66 | | - "\t${1:pass}", |
| 65 | + "for ${1:target_list} in ${2:expression_list}:", |
| 66 | + "\t${3:pass}", |
67 | 67 | "else:", |
68 | | - "\t${2:pass}" |
| 68 | + "\t${4:pass}" |
69 | 69 | ], |
70 | 70 | "description": "Code snippet for a for loop with else" |
71 | 71 | }, |
|
74 | 74 | "body": [ |
75 | 75 | "try:", |
76 | 76 | "\t${1:pass}", |
77 | | - "except ${expression} as ${identifier}:", |
78 | | - "\t${2:pass}" |
| 77 | + "except ${2:expression} as ${3:identifier}:", |
| 78 | + "\t${4:pass}" |
79 | 79 | ], |
80 | 80 | "description": "Code snippet for a try/except statement" |
81 | 81 | }, |
|
94 | 94 | "body": [ |
95 | 95 | "try:", |
96 | 96 | "\t${1:pass}", |
97 | | - "except ${expression} as ${identifier}:", |
98 | | - "\t${2:pass}", |
| 97 | + "except ${2:expression} as ${3:identifier}:", |
| 98 | + "\t${4:pass}", |
99 | 99 | "else:", |
100 | | - "\t${3:pass}" |
| 100 | + "\t${5:pass}" |
101 | 101 | ], |
102 | 102 | "description": "Code snippet for a try/except/else statement" |
103 | 103 | }, |
|
106 | 106 | "body": [ |
107 | 107 | "try:", |
108 | 108 | "\t${1:pass}", |
109 | | - "except ${expression} as ${identifier}:", |
110 | | - "\t${2:pass}", |
| 109 | + "except ${2:expression} as ${3:identifier}:", |
| 110 | + "\t${4:pass}", |
111 | 111 | "finally:", |
112 | | - "\t${3:pass}" |
| 112 | + "\t${5:pass}" |
113 | 113 | ], |
114 | 114 | "description": "Code snippet for a try/except/finally statement" |
115 | 115 | }, |
|
118 | 118 | "body": [ |
119 | 119 | "try:", |
120 | 120 | "\t${1:pass}", |
121 | | - "except ${expression} as ${identifier}:", |
122 | | - "\t${2:pass}", |
| 121 | + "except ${2:expression} as ${3:identifier}:", |
| 122 | + "\t${4:pass}", |
123 | 123 | "else:", |
124 | | - "\t${3:pass}", |
| 124 | + "\t${5:pass}", |
125 | 125 | "finally:", |
126 | | - "\t${4:pass}" |
| 126 | + "\t${6:pass}" |
127 | 127 | ], |
128 | 128 | "description": "Code snippet for a try/except/else/finally statement" |
129 | 129 | }, |
130 | 130 | "with": { |
131 | 131 | "prefix": "with", |
132 | 132 | "body": [ |
133 | | - "with ${expression} as ${target}:", |
134 | | - "\t${pass}" |
| 133 | + "with ${1:expression} as ${2:target}:", |
| 134 | + "\t${3:pass}" |
135 | 135 | ], |
136 | 136 | "description": "Code snippet for a with statement" |
137 | 137 | }, |
138 | 138 | "def": { |
139 | 139 | "prefix": "def", |
140 | 140 | "body": [ |
141 | | - "def ${funcname}(${parameter_list}):", |
142 | | - "\t${pass}" |
| 141 | + "def ${1:funcname}(${2:parameter_list}):", |
| 142 | + "\t${3:pass}" |
143 | 143 | ], |
144 | 144 | "description": "Code snippet for a function definition" |
145 | 145 | }, |
146 | 146 | "def(class method)": { |
147 | 147 | "prefix": "def(class method)", |
148 | 148 | "body": [ |
149 | | - "def ${funcname}(self, ${parameter_list}):", |
150 | | - "\t${pass}" |
| 149 | + "def ${1:funcname}(self, ${2:parameter_list}):", |
| 150 | + "\t${3:pass}" |
151 | 151 | ], |
152 | 152 | "description": "Code snippet for a class method" |
153 | 153 | }, |
154 | 154 | "def(static class method)": { |
155 | 155 | "prefix": "def(static class method)", |
156 | 156 | "body": [ |
157 | 157 | "@staticmethod", |
158 | | - "def ${funcname}(${parameter_list}):", |
159 | | - "\t${pass}" |
| 158 | + "def ${1:funcname}(${2:parameter_list}):", |
| 159 | + "\t${3:pass}" |
160 | 160 | ], |
161 | 161 | "description": "Code snippet for a static class method" |
162 | 162 | }, |
163 | 163 | "def(abstract class method)": { |
164 | 164 | "prefix": "def(abstract class method)", |
165 | 165 | "body": [ |
166 | | - "def ${funcname}(self, ${parameter_list}):", |
| 166 | + "def ${1:funcname}(self, ${2:parameter_list}):", |
167 | 167 | "\traise NotImplementedError" |
168 | 168 | ], |
169 | 169 | "description": "Code snippet for an abstract class method" |
170 | 170 | }, |
171 | 171 | "class": { |
172 | 172 | "prefix": "class", |
173 | 173 | "body": [ |
174 | | - "class ${classname}(${object}):", |
175 | | - "\t${pass}" |
| 174 | + "class ${1:classname}(${2:object}):", |
| 175 | + "\t${3:pass}" |
176 | 176 | ], |
177 | 177 | "description": "Code snippet for a class definition" |
178 | 178 | }, |
179 | 179 | "lambda": { |
180 | 180 | "prefix": "lambda", |
181 | 181 | "body": [ |
182 | | - "lambda ${parameter_list}: ${expression}" |
| 182 | + "lambda ${1:parameter_list}: ${2:expression}" |
183 | 183 | ], |
184 | 184 | "description": "Code snippet for a lambda statement" |
185 | 185 | }, |
186 | 186 | "if(main)": { |
187 | 187 | "prefix": "if(main)", |
188 | 188 | "body": [ |
189 | 189 | "def main():", |
190 | | - "\t${pass}", |
| 190 | + "\t${1:pass}", |
191 | 191 | "", |
192 | 192 | "if __name__ == '__main__':", |
193 | 193 | "\tmain()" |
|
197 | 197 | "async/def": { |
198 | 198 | "prefix": "async/def", |
199 | 199 | "body": [ |
200 | | - "async def ${funcname}(${parameter_list}):", |
201 | | - "\t${pass}" |
| 200 | + "async def ${1:funcname}(${2:parameter_list}):", |
| 201 | + "\t${3:pass}" |
202 | 202 | ], |
203 | 203 | "description": "Code snippet for a async statement" |
204 | 204 | }, |
205 | 205 | "async/for": { |
206 | 206 | "prefix": "async/for", |
207 | 207 | "body": [ |
208 | | - "async for ${target} in ${iter}:", |
209 | | - "\t${block}" |
| 208 | + "async for ${1:target} in ${2:iter}:", |
| 209 | + "\t${3:block}" |
210 | 210 | ], |
211 | 211 | "description": "Code snippet for a async for statement" |
212 | 212 | }, |
213 | 213 | "async/for/else": { |
214 | 214 | "prefix": "async/for/else", |
215 | 215 | "body": [ |
216 | | - "async for ${target} in ${iter}:", |
217 | | - "\t${1:block}", |
| 216 | + "async for ${1:target} in ${2:iter}:", |
| 217 | + "\t${3:block}", |
218 | 218 | "else:", |
219 | | - "\t${2:block}" |
| 219 | + "\t${4:block}" |
220 | 220 | ], |
221 | 221 | "description": "Code snippet for a async for statement with else" |
222 | 222 | }, |
223 | 223 | "async/with": { |
224 | 224 | "prefix": "async/with", |
225 | 225 | "body": [ |
226 | | - "async with ${expr} in ${var}:", |
227 | | - "\t${block}" |
| 226 | + "async with ${1:expr} in ${2:var}:", |
| 227 | + "\t${3:block}" |
228 | 228 | ], |
229 | 229 | "description": "Code snippet for a async with statement" |
230 | 230 | }, |
|
0 commit comments