Skip to content

Commit 7670ee3

Browse files
committed
version 0.1.7
1 parent 89cc06d commit 7670ee3

File tree

7 files changed

+60
-40
lines changed

7 files changed

+60
-40
lines changed

.vscode/launch.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// A launch configuration that launches the extension inside a new window
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
{
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"runtimeExecutable": "${execPath}",
13+
"args": [
14+
"--extensionDevelopmentPath=${workspaceFolder}"
15+
]
16+
}
17+
]
18+
}

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ Including most of the API of Vue.js 2. You can type `vcom`, choose `VueConfigOpt
161161
[vue-syntax-highlight (vue.tmLanguage)](https://github.com/vuejs/vue-syntax-highlight/blob/master/vue.tmLanguage)
162162

163163
--------------------------------------
164+
##### 2018/06/05 (0.1.7)
165+
* Update sinppets, add choices(`this` and `vm`) to snippets that begin with `vm`.
166+
164167
##### 2018/05/22 (0.1.6)
165168
* Update sinppets
166169

package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"icon": "img/logo.png",
77
"description": "A Vue.js 2 Extension",
88
"license": "MIT",
9-
"version": "0.1.6",
9+
"version": "0.1.7",
1010
"engines": {
1111
"vscode": "^1.5.0"
1212
},
@@ -17,7 +17,7 @@
1717
"vue 2"
1818
],
1919
"categories": [
20-
"Languages",
20+
"Programming Languages",
2121
"Snippets"
2222
],
2323
"repository": {
@@ -89,10 +89,6 @@
8989
{
9090
"language": "jade",
9191
"path": "./snippets/pug.json"
92-
},
93-
{
94-
"language": "pug",
95-
"path": "./snippets/pug.json"
9692
}
9793
]
9894
}

snippets/html.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"v-for": {
5252
"prefix": "vFor",
5353
"body": [
54-
"v-for=\"${1:item} in ${2:items}\" :key=\"${3:item.id}\""
54+
"v-for=\"(${1:item}, ${2:index}) in ${3:items}\" :key=\"${4:index}\""
5555
],
5656
"description": "Expects: Array | Object | number | string"
5757
},

snippets/javascript.json

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -440,170 +440,170 @@
440440
"vm.$data": {
441441
"prefix": "vmData",
442442
"body": [
443-
"${1:vm}.\\$data$2"
443+
"${1|this,vm|}.\\$data$2"
444444
],
445445
"description": "Type: Object"
446446
},
447447
"vm.$props": {
448448
"prefix": "vmProps",
449449
"body": [
450-
"${1:vm}.\\$props$2"
450+
"${1|this,vm|}.\\$props$2"
451451
],
452452
"description": "Type: Object"
453453
},
454454
"vm.$el": {
455455
"prefix": "vmEl",
456456
"body": [
457-
"${1:vm}.\\$el$2"
457+
"${1|this,vm|}.\\$el$2"
458458
],
459459
"description": "Type: HTMLElement"
460460
},
461461
"vm.$options": {
462462
"prefix": "vmOptions",
463463
"body": [
464-
"${1:vm}.\\$options$2"
464+
"${1|this,vm|}.\\$options$2"
465465
],
466466
"description": "Type: Object"
467467
},
468468
"vm.$parent": {
469469
"prefix": "vmParent",
470470
"body": [
471-
"${1:vm}.\\$parent$2"
471+
"${1|this,vm|}.\\$parent$2"
472472
],
473473
"description": "Type: Vue instance"
474474
},
475475
"vm.$root": {
476476
"prefix": "vmRoot",
477477
"body": [
478-
"${1:vm}.\\$root$2"
478+
"${1|this,vm|}.\\$root$2"
479479
],
480480
"description": "Type: Vue instance"
481481
},
482482
"vm.$children": {
483483
"prefix": "vmChildren",
484484
"body": [
485-
"${1:vm}.\\$children$2"
485+
"${1|this,vm|}.\\$children$2"
486486
],
487487
"description": "Type: Array<Vue instance>"
488488
},
489489
"vm.$slots": {
490490
"prefix": "vmSlots",
491491
"body": [
492-
"${1:vm}.\\$slots$2"
492+
"${1|this,vm|}.\\$slots$2"
493493
],
494494
"description": "Type: Object"
495495
},
496496
"vm.$scopedSlots": {
497497
"prefix": "vmScopedSlots",
498498
"body": [
499-
"$this.\\$scopedSlots.default({",
500-
"\t",
499+
"${1|this,vm|}.\\$scopedSlots.default({",
500+
"\t$2",
501501
"})"
502502
],
503503
"description": "Type: { [name: string]: props => VNode | Array<VNode> }. Read only. Used to programmatically access scoped slots. For each slot, including the default one, the object contains a corresponding function that returns VNodes. Accessing vm.$scopedSlots is most useful when writing a component with a render function."
504504
},
505505
"vm.$refs": {
506506
"prefix": "vmRefs",
507507
"body": [
508-
"${1:vm}.\\$refs$2"
508+
"${1|this,vm|}.\\$refs$2"
509509
],
510510
"description": "Type: Object"
511511
},
512512
"vm.$isServer": {
513513
"prefix": "vmIsServer",
514514
"body": [
515-
"${1:vm}.\\$isServer$2"
515+
"${1|this,vm|}.\\$isServer$2"
516516
],
517517
"description": "Type: boolean"
518518
},
519519
"vm.$attrs": {
520520
"prefix": "vmAttrs",
521521
"body": [
522-
"${1:vm}.\\$attrs$2"
522+
"${1|this,vm|}.\\$attrs$2"
523523
],
524524
"description": "Type: { [key: string]: string }"
525525
},
526526
"vm.$listeners": {
527527
"prefix": "vmListeners",
528528
"body": [
529-
"${1:vm}.\\$listeners$2"
529+
"${1|this,vm|}.\\$listeners$2"
530530
],
531531
"description": "Type: { [key: string]: Function | Array<Function> }"
532532
},
533533
"vm.$watch": {
534534
"prefix": "vmWatch",
535535
"body": [
536-
"${1:vm}.\\$watch(${2:expOrFn}, ${3:callback})"
536+
"${1|this,vm|}.\\$watch(${2:expOrFn}, ${3:callback})"
537537
],
538538
"description": "vm.$watch( expOrFn, callback, [options] )"
539539
},
540540
"vm.$set": {
541541
"prefix": "vmSet",
542542
"body": [
543-
"${1:vm}.\\$set(${2:object}, ${3:key}, ${4:value})"
543+
"${1|this,vm|}.\\$set(${2:object}, ${3:key}, ${4:value})"
544544
],
545545
"description": "vm.$set( object, key, value )"
546546
},
547547
"vm.$delete": {
548548
"prefix": "vmDelete",
549549
"body": [
550-
"${1:vm}.\\$delete(${2:object}, ${3:key})"
550+
"${1|this,vm|}.\\$delete(${2:object}, ${3:key})"
551551
],
552552
"description": "vm.$delete( object, key )"
553553
},
554554
"vm.$on": {
555555
"prefix": "vmOn",
556556
"body": [
557-
"${1:vm}.\\$on('${2:event}', ${3:callback})$4"
557+
"${1|this,vm|}.\\$on('${2:event}', ${3:callback})$4"
558558
],
559559
"description": "vm.$on( event, callback )"
560560
},
561561
"vm.$once": {
562562
"prefix": "vmOnce",
563563
"body": [
564-
"${1:vm}.\\$once('${2:event}', ${3:callback})$4"
564+
"${1|this,vm|}.\\$once('${2:event}', ${3:callback})$4"
565565
],
566566
"description": "vm.$once( event, callback )"
567567
},
568568
"vm.$off": {
569569
"prefix": "vmOff",
570570
"body": [
571-
"${1:vm}.\\$off('${2:event}', ${3:callback})$4"
571+
"${1|this,vm|}.\\$off('${2:event}', ${3:callback})$4"
572572
],
573573
"description": "vm.$off( [event, callback] )"
574574
},
575575
"vm.$emit": {
576576
"prefix": "vmEmit",
577577
"body": [
578-
"${1:vm}.\\$emit('${2:event}'${3:, […args]})$4"
578+
"${1|this,vm|}.\\$emit('${2:event}'${3:, […args]})$4"
579579
],
580580
"description": "vm.$emit( event, […args] )"
581581
},
582582
"vm.$mount": {
583583
"prefix": "vmMount",
584584
"body": [
585-
"${1:vm}.\\$mount('$2')"
585+
"${1|this,vm|}.\\$mount('$2')"
586586
],
587587
"description": "vm.$mount( [elementOrSelector] )"
588588
},
589589
"vm.$forceUpdate": {
590590
"prefix": "vmForceUpdate",
591591
"body": [
592-
"${1:vm}.\\$forceUpdate()"
592+
"${1|this,vm|}.\\$forceUpdate()"
593593
],
594594
"description": "vm.$forceUpdate()"
595595
},
596596
"vm.$nextTick": {
597597
"prefix": "vmNextTick",
598598
"body": [
599-
"${1:vm}.\\$nextTick(${2:callback})"
599+
"${1|this,vm|}.\\$nextTick(${2:callback})"
600600
],
601601
"description": "vm.$nextTick( callback )"
602602
},
603603
"vm.$destroy": {
604604
"prefix": "vmDestroy",
605605
"body": [
606-
"${1:vm}.\\$destroy()$2"
606+
"${1|this,vm|}.\\$destroy()$2"
607607
],
608608
"description": "vm.$destroy()"
609609
},

snippets/pug.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,17 @@
4141
],
4242
"description": "Expects: any. previous sibling element must have v-if or v-else-if."
4343
},
44+
"v-for-without-key": {
45+
"prefix": "vForWithoutKey",
46+
"body": [
47+
"v-for=\"${1:item} in ${2:items}\""
48+
],
49+
"description": "Expects: Array | Object | number | string"
50+
},
4451
"v-for": {
4552
"prefix": "vFor",
4653
"body": [
47-
"v-for=\"${1:item} in ${2:items}\""
54+
"v-for=\"${1:item} in ${2:items}\" :key=\"${3:item.id}\""
4855
],
4956
"description": "Expects: Array | Object | number | string"
5057
},
@@ -90,13 +97,12 @@
9097
],
9198
"description": "Does not expect expression"
9299
},
93-
94100
"key": {
95101
"prefix": "key",
96102
"body": [
97103
":key=\"${1:key}\""
98104
],
99-
"description":"Expects: string. The key special attribute is primarily used as a hint for Vue’s virtual DOM algorithm to identify VNodes when diffing the new list of nodes against the old list. Without keys, Vue uses an algorithm that minimizes element movement and tries to patch/reuse elements of the same type in-place as much as possible. With keys, it will reorder elements based on the order change of keys, and elements with keys that are no longer present will always be removed/destroyed. Children of the same common parent must have unique keys. Duplicate keys will cause render errors."
105+
"description": "Expects: string. The key special attribute is primarily used as a hint for Vue’s virtual DOM algorithm to identify VNodes when diffing the new list of nodes against the old list. Without keys, Vue uses an algorithm that minimizes element movement and tries to patch/reuse elements of the same type in-place as much as possible. With keys, it will reorder elements based on the order change of keys, and elements with keys that are no longer present will always be removed/destroyed. Children of the same common parent must have unique keys. Duplicate keys will cause render errors."
100106
},
101107
"ref": {
102108
"prefix": "ref",
@@ -119,12 +125,10 @@
119125
],
120126
"description": "<slot></slot>. Expects: string. Used on content inserted into child components to indicate which named slot the content belongs to."
121127
},
122-
123128
"component": {
124129
"prefix": "component",
125130
"body": [
126131
"component(:is=\"${1:componentId}\") $0"
127-
128132
],
129133
"description": "component element"
130134
},
@@ -149,7 +153,6 @@
149153
],
150154
"description": "transition-group element"
151155
},
152-
153156
"routerLink": {
154157
"prefix": "routerLink",
155158
"body": [
@@ -185,4 +188,4 @@
185188
],
186189
"description": "router-view element"
187190
}
188-
}
191+
}

snippets/vue.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"prefix": "templateLang",
1313
"body": [
1414
"<template lang=\"$1\">",
15-
"\t$1",
15+
"\t$0",
1616
"</template>"
1717
],
1818
"description": "template element"

0 commit comments

Comments
 (0)