├── .vscodeignore
├── LICENSE
├── README.md
├── images
└── logo.png
├── package.json
└── snippets
├── html.json
└── typescript.json
/.vscodeignore:
--------------------------------------------------------------------------------
1 | screenshot.gif
2 | screenshot.jpg
3 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Nathan Walker
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## NativeScript + Angular Snippets for Visual Studio Code ##
2 |
3 | Now compatible with Angular 4.x and above.
4 |
5 | This JSON file contains snippets for all NativeScript UI components and some frequently used attributes specifically for use with [nativescript-angular](https://github.com/NativeScript/nativescript-angular).
6 |
7 | All UI components are prefixed with ```ns```. Attributes do not have a prefix.
8 |
9 | 
10 |
11 | ###UI Components
12 |
13 | #### From within TypeScript `Component` Files:
14 |
15 | - Component with inline template - ```nscomponent_template```
16 | - Component with templateUrl - ```nscomponent_templateUrl```
17 |
18 | The following can be used inside both TypeScript and HTML view files:
19 |
20 | #### Layouts
21 | - Absolute Layout - ```nsabsolute```
22 | - Dock Layout - ```nsdock```
23 | - Flexbox Layout - ```nsflexbox```
24 | - Grid Layout - ```nsgrid```
25 | - Stack Layout - ```nsstack```
26 | - Wrap Layout - ```nswrap```
27 |
28 | ### Widgets
29 | - Action Bar - ```nsactionbar```
30 | - Action Bar with Back Button - ```nsactionbarback```
31 | - Label - ```nslabel```
32 | - Text Field - ```nstextfield```
33 | - Secure Text Field (for passwords) - ```nspassword```
34 | - Text View - ```nstextview```
35 | - Image - ```nsimg```
36 | - Border - ```nsborder```
37 | - Button - ```nsbtn```
38 | - Search Bar - ```nssearchbar```
39 | - Switch - ```nsswitch```
40 | - Slider - ```nsslider```
41 | - Progress - ```nsprogress```
42 | - Activity Indicator - ```nsloading```
43 | - Date Picker - ```nsdate```
44 | - Time Picker - ```nstime```
45 | - List Picker - ```nslistpicker```
46 | - Segmented Bar - ```nssegmentedbar```
47 | - Tab View - ```nstabview```
48 | - List View - ```nslistview```
49 | - Web View - ```nswebview```
50 |
51 | ###Attributes
52 | - cssClass - ```css```
53 | - text - ```text```
54 | - icon - ```icon```
55 | - tap - ```tap```
56 | - textWrap - ```wrap```
57 | - horizontalAlignment - ```halign```
58 | - verticalAlignment - ```valign```
59 | - visibility - ```visibility```
60 | - stretch - ```stretch```
61 | - keyboardType - ```kbtype```
62 | - colSpan - ```colspan```
63 | - rowSpan - ```rowspan```
64 | - row - ```row```
65 | - col - ```col```
66 | - width - ```width```
67 | - height - ```height```
68 |
69 | ## How to use? ##
70 |
71 | 1. Inside Visual Studio Code press
72 | ```bash
73 | CTRL + P
74 | ```
75 |
76 | 2. Type the following in the console window
77 | ``` bash
78 | ext install nativescript-ng2-snippets
79 | ```
80 | 3. Hit enter.
81 |
--------------------------------------------------------------------------------
/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanWalker/nativescript-ng2-vscode-snippets/3ecc9c3db8b218ee399672544c7b20b0ad2701e8/images/logo.png
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nativescript-ng2-snippets",
3 | "displayName": "NativeScript + Angular Snippets",
4 | "description": "Snippets for NativeScript + Angular Development.",
5 | "version": "2.0.1",
6 | "publisher": "wwwalkerrun",
7 | "icon": "images/logo.png",
8 | "galleryBanner": {
9 | "color": "#0c121c",
10 | "theme": "dark"
11 | },
12 | "license": "MIT",
13 | "bugs": {
14 | "url": "https://github.com/NathanWalker/nativescript-ng2-vscode-snippets/issues",
15 | "email": "walkerrunpdx@gmail.com"
16 | },
17 | "homepage": "https://github.com/NathanWalker/nativescript-ng2-vscode-snippets/blob/master/README.md",
18 | "repository": {
19 | "type": "git",
20 | "url": "https://github.com/NathanWalker/nativescript-ng2-vscode-snippets.git"
21 | },
22 | "categories": [
23 | "Snippets"
24 | ],
25 | "keywords": [
26 | "nativescript",
27 | "telerik",
28 | "ng2",
29 | "angular",
30 | "snippets"
31 | ],
32 | "contributes": {
33 | "snippets": [
34 | {
35 | "language": "html",
36 | "path": "./snippets/html.json"
37 | },
38 | {
39 | "language": "typescript",
40 | "path": "./snippets/typescript.json"
41 | }
42 | ]
43 | },
44 | "extensionDependencies": [
45 | "johnpapa.Angular2"
46 | ],
47 | "engines": { "vscode": "0.10.x" }
48 | }
--------------------------------------------------------------------------------
/snippets/html.json:
--------------------------------------------------------------------------------
1 | {
2 | // Action Bar
3 | "{N} Action Bar": {
4 | "prefix": "nsactionbar",
5 | "body": [
6 | "",
7 | ""
8 | ]
9 | },
10 |
11 | "{N} Action Bar with Action Items": {
12 | "prefix": "nsactionbaritems",
13 | "body": [
14 | "",
15 | " ",
16 | " ",
17 | " ",
18 | " ",
19 | " ",
20 | " ",
21 | ""
22 | ]
23 | },
24 |
25 | "{N} Action Item": {
26 | "prefix": "nsactionitem",
27 | "body": [
28 | "",
29 | " ",
30 | ""
31 | ]
32 | },
33 |
34 | "{N} Action Item on the Right": {
35 | "prefix": "nsactionitemright",
36 | "body": [
37 | "",
38 | " ",
39 | ""
40 | ]
41 | },
42 |
43 | "{N} Action Bar with Back": {
44 | "prefix": "nsactionbarback",
45 | "body": [
46 | "",
47 | " ",
48 | ""
49 | ]
50 | },
51 |
52 | "{N} Navigation Button": {
53 | "prefix": "nsactionbarnavbtn",
54 | "body": [
55 | ""
56 | ]
57 | },
58 |
59 | "{N} Action Bar with Custom Title": {
60 | "prefix": "nsactionbarcustomtitle",
61 | "body": [
62 | "",
63 | " ",
66 | " ",
67 | " ",
68 | " ",
69 | " ",
70 | " ",
71 | ""
72 | ]
73 | },
74 |
75 | // Layouts
76 | "{N} Flexbox Layout": {
77 | "prefix": "nsflexbox",
78 | "body": [
79 | "",
80 | " $1",
81 | ""
82 | ]
83 | },
84 | "{N} Flexbox Layout Column": {
85 | "prefix": "nsflexbox_column",
86 | "body": [
87 | "",
88 | " $1",
89 | ""
90 | ]
91 | },
92 | "{N} Stack Layout": {
93 | "prefix": "nsstack",
94 | "body": [
95 | "",
96 | " $1",
97 | ""
98 | ]
99 | },
100 | "{N} Stack Layout Horizontal": {
101 | "prefix": "nsstack_horizontal",
102 | "body": [
103 | "",
104 | " $1",
105 | ""
106 | ]
107 | },
108 | "{N} Wrap Layout": {
109 | "prefix": "nswrap",
110 | "body": [
111 | "",
112 | " $3",
113 | ""
114 | ]
115 | },
116 | "{N} Absolute Layout": {
117 | "prefix": "nsabsolute",
118 | "body": [
119 | "",
120 | " ",
121 | " $1",
122 | ""
123 | ]
124 | },
125 | "{N} Dock Layout": {
126 | "prefix": "nsdock",
127 | "body": [
128 | "",
129 | " ",
130 | ""
131 | ]
132 | },
133 | "{N} Grid Layout": {
134 | "prefix": "nsgrid",
135 | "body": [
136 | "",
137 | " $3",
138 | ""
139 | ]
140 | },
141 | "{N} Grid Layout 2x2": {
142 | "prefix": "nsgrid_2x2",
143 | "body": [
144 | "",
145 | " ",
146 | " ",
147 | " ",
148 | " ",
149 | ""
150 | ]
151 | },
152 | "{N} Grid Layout 2x2 Automatic Width/Height": {
153 | "prefix": "nsgrid_2x2_auto",
154 | "body": [
155 | "",
156 | " ",
157 | " ",
158 | " ",
159 | " ",
160 | ""
161 | ]
162 | },
163 | "{N} Grid Layout 3x3 ": {
164 | "prefix": "nsgrid_3x3",
165 | "body": [
166 | "",
167 | " ",
168 | " ",
169 | " ",
170 | " ",
171 | " ",
172 | " ",
173 | " ",
174 | " ",
175 | " ",
176 | ""
177 | ]
178 | },
179 | "{N} Grid Layout 3x3 Automatic Width/Height": {
180 | "prefix": "nsgrid_3x3_auto",
181 | "body": [
182 | "",
183 | " ",
184 | " ",
185 | " ",
186 | " ",
187 | " ",
188 | " ",
189 | " ",
190 | " ",
191 | " ",
192 | ""
193 | ]
194 | },
195 | "{N} Grid Layout 4x3 ": {
196 | "prefix": "nsgrid_4x3",
197 | "body": [
198 | "",
199 | " ",
200 | " ",
201 | " ",
202 | " ",
203 | " ",
204 | " ",
205 | " ",
206 | " ",
207 | " ",
208 | " ",
209 | " ",
210 | " ",
211 | ""
212 | ]
213 | },
214 | "{N} Grid Layout 4x3 Automatic Width/Height": {
215 | "prefix": "nsgrid_4x3_auto",
216 | "body": [
217 | "",
218 | " ",
219 | " ",
220 | " ",
221 | " ",
222 | " ",
223 | " ",
224 | " ",
225 | " ",
226 | " ",
227 | " ",
228 | " ",
229 | " ",
230 | ""
231 | ]
232 | },
233 | "{N} Grid Layout 4x4": {
234 | "prefix": "nsgrid_4x4",
235 | "body": [
236 | "",
237 | " ",
238 | " ",
239 | " ",
240 | " ",
241 | " ",
242 | " ",
243 | " ",
244 | " ",
245 | " ",
246 | " ",
247 | " ",
248 | " ",
249 | " ",
250 | " ",
251 | " ",
252 | " ",
253 | ""
254 | ]
255 | },
256 | "{N} Grid Layout 4x4 Automatic Width/Height": {
257 | "prefix": "nsgrid_4x4_auto",
258 | "body": [
259 | "",
260 | " ",
261 | " ",
262 | " ",
263 | " ",
264 | " ",
265 | " ",
266 | " ",
267 | " ",
268 | " ",
269 | " ",
270 | " ",
271 | " ",
272 | " ",
273 | " ",
274 | " ",
275 | " ",
276 | ""
277 | ]
278 | },
279 |
280 | // Views
281 | "{N} Scroll View": {
282 | "prefix": "nsscrollview",
283 | "body": [
284 | "",
285 | " $1",
286 | ""
287 | ]
288 | },
289 | "{N} List View": {
290 | "prefix": "nslistview",
291 | "body": [
292 | "",
293 | " ",
294 | " ",
295 | " ",
296 | " $1",
297 | " ",
298 | " ",
299 | ""
300 | ]
301 | },
302 | "{N} Tab View": {
303 | "prefix": "nstabview",
304 | "body": [
305 | "",
306 | " ",
307 | " ",
308 | " ",
309 | " ",
310 | " ",
311 | " ",
312 | "",
313 | "$1"
314 | ]
315 | },
316 | "{N} Web View": {
317 | "prefix": "nswebview",
318 | "body": [
319 | "",
320 | "$1"
321 | ]
322 | },
323 |
324 | // Widgets
325 | "{N} Image": {
326 | "prefix": "nsimg",
327 | "body": [
328 | "",
329 | "$2"
330 | ]
331 | },
332 | "{N} Label": {
333 | "prefix": "nslabel",
334 | "body": [
335 | "",
336 | "$2"
337 | ]
338 | },
339 | "{N} Button": {
340 | "prefix": "nsbtn",
341 | "body": [
342 | "",
343 | "$3"
344 | ]
345 | },
346 | "{N} Text Field": {
347 | "prefix": "nstextfield",
348 | "body": [
349 | "",
350 | "$3"
351 | ]
352 | },
353 | "{N} Password Field": {
354 | "prefix": "nspassword",
355 | "body": [
356 | "",
357 | "$2"
358 | ]
359 | },
360 | "{N} Editable TextView": {
361 | "prefix": "nstextview_editable",
362 | "body": [
363 | "",
364 | "$3"
365 | ]
366 | },
367 | "{N} Non-Editable TextView": {
368 | "prefix": "nstextview_non-editable",
369 | "body": [
370 | "",
371 | "$2"
372 | ]
373 | },
374 | "{N} SearchBar": {
375 | "prefix": "nssearchbar",
376 | "body": [
377 | "",
378 | "$6"
379 | ]
380 | },
381 | "{N} Switch": {
382 | "prefix": "nsswitch",
383 | "body": [
384 | "",
385 | "$2"
386 | ]
387 | },
388 | "{N} Progress Bar": {
389 | "prefix": "nsprogress",
390 | "body": [
391 | "",
392 | "$2"
393 | ]
394 | },
395 | "{N} Slider": {
396 | "prefix": "nsslider",
397 | "body": [
398 | "",
399 | "$4"
400 | ]
401 | },
402 | "{N} Date Picker": {
403 | "prefix": "nsdate",
404 | "body": [
405 | "",
406 | "$4"
407 | ]
408 | },
409 | "{N} Time Picker": {
410 | "prefix": "nstime",
411 | "body": [
412 | "",
413 | "$3"
414 | ]
415 | },
416 | "{N} List Picker": {
417 | "prefix": "nslistpicker",
418 | "body": [
419 | "",
420 | "$3"
421 | ]
422 | },
423 | "{N} Activity Indicator": {
424 | "prefix": "nsloading",
425 | "body": [
426 | "",
427 | "$2"
428 | ]
429 | },
430 | "{N} Segmented Bar": {
431 | "prefix": "nssegmentedbar",
432 | "body": [
433 | "",
434 | ""
435 | ]
436 | },
437 | "{N} Border": {
438 | "prefix": "nsborder",
439 | "body": [
440 | "",
441 | " $3",
442 | ""
443 | ]
444 | },
445 |
446 | // Attributes
447 | "{N} CSS Class Attribute": {
448 | "prefix": "css",
449 | "body": "class=\"$1\"$2"
450 | },
451 | "{N} Text Attribute": {
452 | "prefix": "text",
453 | "body": "text=\"$1\"$2"
454 | },
455 | "{N} Text Binding Attribute": {
456 | "prefix": "textbinding",
457 | "body": "[text]=\"$1\"$2"
458 | },
459 | "{N} Icon Attribute": {
460 | "prefix": "icon",
461 | "body": "icon=\"res://$1\"$2"
462 | },
463 | "{N} Tap Attribute": {
464 | "prefix": "tap",
465 | "body": "(tap)=\"$1\"$2"
466 | },
467 | "{N} Text Wrap Attribute": {
468 | "prefix": "wrap",
469 | "body": "textWrap=\"true\"$2"
470 | },
471 | "{N} Horizontal Alignment Attribute": {
472 | "prefix": "halign",
473 | "body": "horizontalAlignment=\"$1\"$2"
474 | },
475 | "{N} Vertical Alignment Attribute": {
476 | "prefix": "valign",
477 | "body": "verticalAlignment=\"$1\"$2"
478 | },
479 | "{N} Visibility Attribute": {
480 | "prefix": "visibility",
481 | "body": "[visibility]=\"isItemVisible ? 'visible' : 'collapsed'\"$2"
482 | },
483 | "{N} Stretch Attribute": {
484 | "prefix": "stretch",
485 | "body": "stretch=\"fill$1\"$2"
486 | },
487 | "{N} Keyboard Type Attribute": {
488 | "prefix": "kbtype",
489 | "body": "keyboardType=\"email$1\"$2"
490 | },
491 | "{N} Row Attribute": {
492 | "prefix": "row",
493 | "body": "row=\"$1\"$2"
494 | },
495 | "{N} Column Attribute": {
496 | "prefix": "col",
497 | "body": "col=\"$1\"$2"
498 | },
499 | "{N} Colspan Attribute": {
500 | "prefix": "colspan",
501 | "body": "colSpan=\"$1\"$2"
502 | },
503 | "{N} Rowspan Attribute": {
504 | "prefix": "rowspan",
505 | "body": "rowSpan=\"$1\"$2"
506 | },
507 | "{N} Width Attribute": {
508 | "prefix": "width",
509 | "body": "width=\"$1\"$2"
510 | },
511 | "{N} Height Attribute": {
512 | "prefix": "height",
513 | "body": "height=\"$1\"$2"
514 | }
515 | }
516 |
--------------------------------------------------------------------------------
/snippets/typescript.json:
--------------------------------------------------------------------------------
1 | {
2 | // Component
3 | "{N} Component with template": {
4 | "prefix": "nscomponent_template",
5 | "body": [
6 | "import { Component } from '@angular/core';",
7 | "",
8 | "@Component({",
9 | " selector: '$1',",
10 | " template: `",
11 | " ",
12 | " ",
13 | " ",
14 | " `",
15 | "})",
16 | "export class $2 {",
17 | "",
18 | " constructor() {",
19 | "",
20 | " }",
21 | "}"
22 | ]
23 | },
24 |
25 | "{N} Component with templateUrl": {
26 | "prefix": "nscomponent_templateUrl",
27 | "body": [
28 | "import { Component } from '@angular/core';",
29 | "",
30 | "@Component({",
31 | " selector: '$1',",
32 | " templateUrl: `$2`",
33 | "})",
34 | "export class $3 {",
35 | "",
36 | " constructor() {",
37 | "",
38 | " }",
39 | "}"
40 | ]
41 | },
42 |
43 | // Action Bar
44 | "{N} Action Bar": {
45 | "prefix": "nsactionbar",
46 | "body": [
47 | "",
48 | ""
49 | ]
50 | },
51 |
52 | "{N} Action Bar with Action Items": {
53 | "prefix": "nsactionbaritems",
54 | "body": [
55 | "",
56 | " ",
57 | " ",
58 | " ",
59 | " ",
60 | " ",
61 | " ",
62 | ""
63 | ]
64 | },
65 |
66 | "{N} Action Item": {
67 | "prefix": "nsactionitem",
68 | "body": [
69 | "",
70 | " ",
71 | ""
72 | ]
73 | },
74 |
75 | "{N} Action Item on the Right": {
76 | "prefix": "nsactionitemright",
77 | "body": [
78 | "",
79 | " ",
80 | ""
81 | ]
82 | },
83 |
84 | "{N} Action Bar with Back": {
85 | "prefix": "nsactionbarback",
86 | "body": [
87 | "",
88 | " ",
89 | ""
90 | ]
91 | },
92 |
93 | "{N} Navigation Button": {
94 | "prefix": "nsactionbarnavbtn",
95 | "body": [
96 | ""
97 | ]
98 | },
99 |
100 | "{N} Action Bar with Custom Title": {
101 | "prefix": "nsactionbarcustomtitle",
102 | "body": [
103 | "",
104 | " ",
107 | " ",
108 | " ",
109 | " ",
110 | " ",
111 | " ",
112 | ""
113 | ]
114 | },
115 |
116 | // Layouts
117 | "{N} Flexbox Layout": {
118 | "prefix": "nsflexbox",
119 | "body": [
120 | "",
121 | " $1",
122 | ""
123 | ]
124 | },
125 | "{N} Flexbox Layout Column": {
126 | "prefix": "nsflexbox_column",
127 | "body": [
128 | "",
129 | " $1",
130 | ""
131 | ]
132 | },
133 | "{N} Stack Layout": {
134 | "prefix": "nsstack",
135 | "body": [
136 | "",
137 | " $1",
138 | ""
139 | ]
140 | },
141 | "{N} Stack Layout Horizontal": {
142 | "prefix": "nsstack_horizontal",
143 | "body": [
144 | "",
145 | " $1",
146 | ""
147 | ]
148 | },
149 | "{N} Wrap Layout": {
150 | "prefix": "nswrap",
151 | "body": [
152 | "",
153 | " $3",
154 | ""
155 | ]
156 | },
157 | "{N} Absolute Layout": {
158 | "prefix": "nsabsolute",
159 | "body": [
160 | "",
161 | " ",
162 | " $1",
163 | ""
164 | ]
165 | },
166 | "{N} Dock Layout": {
167 | "prefix": "nsdock",
168 | "body": [
169 | "",
170 | " ",
171 | ""
172 | ]
173 | },
174 | "{N} Grid Layout": {
175 | "prefix": "nsgrid",
176 | "body": [
177 | "",
178 | " $3",
179 | ""
180 | ]
181 | },
182 | "{N} Grid Layout 2x2": {
183 | "prefix": "nsgrid_2x2",
184 | "body": [
185 | "",
186 | " ",
187 | " ",
188 | " ",
189 | " ",
190 | ""
191 | ]
192 | },
193 | "{N} Grid Layout 2x2 Automatic Width/Height": {
194 | "prefix": "nsgrid_2x2_auto",
195 | "body": [
196 | "",
197 | " ",
198 | " ",
199 | " ",
200 | " ",
201 | ""
202 | ]
203 | },
204 | "{N} Grid Layout 3x3 ": {
205 | "prefix": "nsgrid_3x3",
206 | "body": [
207 | "",
208 | " ",
209 | " ",
210 | " ",
211 | " ",
212 | " ",
213 | " ",
214 | " ",
215 | " ",
216 | " ",
217 | ""
218 | ]
219 | },
220 | "{N} Grid Layout 3x3 Automatic Width/Height": {
221 | "prefix": "nsgrid_3x3_auto",
222 | "body": [
223 | "",
224 | " ",
225 | " ",
226 | " ",
227 | " ",
228 | " ",
229 | " ",
230 | " ",
231 | " ",
232 | " ",
233 | ""
234 | ]
235 | },
236 | "{N} Grid Layout 4x3 ": {
237 | "prefix": "nsgrid_4x3",
238 | "body": [
239 | "",
240 | " ",
241 | " ",
242 | " ",
243 | " ",
244 | " ",
245 | " ",
246 | " ",
247 | " ",
248 | " ",
249 | " ",
250 | " ",
251 | " ",
252 | ""
253 | ]
254 | },
255 | "{N} Grid Layout 4x3 Automatic Width/Height": {
256 | "prefix": "nsgrid_4x3_auto",
257 | "body": [
258 | "",
259 | " ",
260 | " ",
261 | " ",
262 | " ",
263 | " ",
264 | " ",
265 | " ",
266 | " ",
267 | " ",
268 | " ",
269 | " ",
270 | " ",
271 | ""
272 | ]
273 | },
274 | "{N} Grid Layout 4x4": {
275 | "prefix": "nsgrid_4x4",
276 | "body": [
277 | "",
278 | " ",
279 | " ",
280 | " ",
281 | " ",
282 | " ",
283 | " ",
284 | " ",
285 | " ",
286 | " ",
287 | " ",
288 | " ",
289 | " ",
290 | " ",
291 | " ",
292 | " ",
293 | " ",
294 | ""
295 | ]
296 | },
297 | "{N} Grid Layout 4x4 Automatic Width/Height": {
298 | "prefix": "nsgrid_4x4_auto",
299 | "body": [
300 | "",
301 | " ",
302 | " ",
303 | " ",
304 | " ",
305 | " ",
306 | " ",
307 | " ",
308 | " ",
309 | " ",
310 | " ",
311 | " ",
312 | " ",
313 | " ",
314 | " ",
315 | " ",
316 | " ",
317 | ""
318 | ]
319 | },
320 |
321 | // Views
322 | "{N} Scroll View": {
323 | "prefix": "nsscrollview",
324 | "body": [
325 | "",
326 | " $1",
327 | ""
328 | ]
329 | },
330 | "{N} List View": {
331 | "prefix": "nslistview",
332 | "body": [
333 | "",
334 | " ",
335 | " ",
336 | " ",
337 | " $1",
338 | " ",
339 | " ",
340 | ""
341 | ]
342 | },
343 | "{N} Tab View": {
344 | "prefix": "nstabview",
345 | "body": [
346 | "",
347 | " ",
348 | " ",
349 | " ",
350 | " ",
351 | " ",
352 | " ",
353 | "",
354 | "$1"
355 | ]
356 | },
357 | "{N} Web View": {
358 | "prefix": "nswebview",
359 | "body": [
360 | "",
361 | "$1"
362 | ]
363 | },
364 |
365 | // Widgets
366 | "{N} Image": {
367 | "prefix": "nsimg",
368 | "body": [
369 | "",
370 | "$2"
371 | ]
372 | },
373 | "{N} Label": {
374 | "prefix": "nslabel",
375 | "body": [
376 | "",
377 | "$2"
378 | ]
379 | },
380 | "{N} Button": {
381 | "prefix": "nsbtn",
382 | "body": [
383 | "",
384 | "$3"
385 | ]
386 | },
387 | "{N} Text Field": {
388 | "prefix": "nstextfield",
389 | "body": [
390 | "",
391 | "$3"
392 | ]
393 | },
394 | "{N} Password Field": {
395 | "prefix": "nspassword",
396 | "body": [
397 | "",
398 | "$2"
399 | ]
400 | },
401 | "{N} Editable TextView": {
402 | "prefix": "nstextview_editable",
403 | "body": [
404 | "",
405 | "$3"
406 | ]
407 | },
408 | "{N} Non-Editable TextView": {
409 | "prefix": "nstextview_non-editable",
410 | "body": [
411 | "",
412 | "$2"
413 | ]
414 | },
415 | "{N} SearchBar": {
416 | "prefix": "nssearchbar",
417 | "body": [
418 | "",
419 | "$6"
420 | ]
421 | },
422 | "{N} Switch": {
423 | "prefix": "nsswitch",
424 | "body": [
425 | "",
426 | "$2"
427 | ]
428 | },
429 | "{N} Progress Bar": {
430 | "prefix": "nsprogress",
431 | "body": [
432 | "",
433 | "$2"
434 | ]
435 | },
436 | "{N} Slider": {
437 | "prefix": "nsslider",
438 | "body": [
439 | "",
440 | "$4"
441 | ]
442 | },
443 | "{N} Date Picker": {
444 | "prefix": "nsdate",
445 | "body": [
446 | "",
447 | "$4"
448 | ]
449 | },
450 | "{N} Time Picker": {
451 | "prefix": "nstime",
452 | "body": [
453 | "",
454 | "$3"
455 | ]
456 | },
457 | "{N} List Picker": {
458 | "prefix": "nslistpicker",
459 | "body": [
460 | "",
461 | "$3"
462 | ]
463 | },
464 | "{N} Activity Indicator": {
465 | "prefix": "nsloading",
466 | "body": [
467 | "",
468 | "$2"
469 | ]
470 | },
471 | "{N} Segmented Bar": {
472 | "prefix": "nssegmentedbar",
473 | "body": [
474 | "",
475 | ""
476 | ]
477 | },
478 | "{N} Border": {
479 | "prefix": "nsborder",
480 | "body": [
481 | "",
482 | " $3",
483 | ""
484 | ]
485 | },
486 |
487 | // Attributes
488 | "{N} CSS Class Attribute": {
489 | "prefix": "css",
490 | "body": "class=\"$1\"$2"
491 | },
492 | "{N} Text Attribute": {
493 | "prefix": "text",
494 | "body": "text=\"$1\"$2"
495 | },
496 | "{N} Text Binding Attribute": {
497 | "prefix": "textbinding",
498 | "body": "[text]=\"$1\"$2"
499 | },
500 | "{N} Icon Attribute": {
501 | "prefix": "icon",
502 | "body": "icon=\"res://$1\"$2"
503 | },
504 | "{N} Tap Attribute": {
505 | "prefix": "tap",
506 | "body": "(tap)=\"$1\"$2"
507 | },
508 | "{N} Text Wrap Attribute": {
509 | "prefix": "wrap",
510 | "body": "textWrap=\"true\"$2"
511 | },
512 | "{N} Horizontal Alignment Attribute": {
513 | "prefix": "halign",
514 | "body": "horizontalAlignment=\"$1\"$2"
515 | },
516 | "{N} Vertical Alignment Attribute": {
517 | "prefix": "valign",
518 | "body": "verticalAlignment=\"$1\"$2"
519 | },
520 | "{N} Visibility Attribute": {
521 | "prefix": "visibility",
522 | "body": "[visibility]=\"isItemVisible ? 'visible' : 'collapsed'\"$2"
523 | },
524 | "{N} Stretch Attribute": {
525 | "prefix": "stretch",
526 | "body": "stretch=\"fill$1\"$2"
527 | },
528 | "{N} Keyboard Type Attribute": {
529 | "prefix": "kbtype",
530 | "body": "keyboardType=\"email$1\"$2"
531 | },
532 | "{N} Row Attribute": {
533 | "prefix": "row",
534 | "body": "row=\"$1\"$2"
535 | },
536 | "{N} Column Attribute": {
537 | "prefix": "col",
538 | "body": "col=\"$1\"$2"
539 | },
540 | "{N} Colspan Attribute": {
541 | "prefix": "colspan",
542 | "body": "colSpan=\"$1\"$2"
543 | },
544 | "{N} Rowspan Attribute": {
545 | "prefix": "rowspan",
546 | "body": "rowSpan=\"$1\"$2"
547 | },
548 | "{N} Width Attribute": {
549 | "prefix": "width",
550 | "body": "width=\"$1\"$2"
551 | },
552 | "{N} Height Attribute": {
553 | "prefix": "height",
554 | "body": "height=\"$1\"$2"
555 | }
556 | }
--------------------------------------------------------------------------------