├── .gitattributes
├── .gitignore
├── .vscode
└── launch.json
├── README.md
├── img
├── VueInit.gif
├── logo.png
├── show.png
├── show1.png
└── show2.png
├── package.json
└── snippets
├── html.json
├── javascript.json
├── pug.json
└── vue.json
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows image file caches
2 | Thumbs.db
3 | ehthumbs.db
4 |
5 | # Folder config file
6 | Desktop.ini
7 |
8 | # Recycle Bin used on file shares
9 | $RECYCLE.BIN/
10 |
11 | # Windows Installer files
12 | *.cab
13 | *.msi
14 | *.msm
15 | *.msp
16 |
17 | # Windows shortcuts
18 | *.lnk
19 |
20 | # =========================
21 | # Operating System Files
22 | # =========================
23 |
24 | # OSX
25 | # =========================
26 |
27 | .DS_Store
28 | .AppleDouble
29 | .LSOverride
30 |
31 | # Thumbnails
32 | ._*
33 |
34 | # Files that might appear in the root of a volume
35 | .DocumentRevisions-V100
36 | .fseventsd
37 | .Spotlight-V100
38 | .TemporaryItems
39 | .Trashes
40 | .VolumeIcon.icns
41 |
42 | # Directories potentially created on remote AFP share
43 | .AppleDB
44 | .AppleDesktop
45 | Network Trash Folder
46 | Temporary Items
47 | .apdisk
48 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
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:
--------------------------------------------------------------------------------
1 | # Vue 2 Snippets for Visual Studio Code
2 |
3 | This extension adds Vue 2 Code Snippets into Visual Studio Code.
4 |
5 | 这个插件基于最新的 Vue 2 的 API 添加了Code Snippets。
6 |
7 | [](https://marketplace.visualstudio.com/items?itemName=hollowtree.vue-snippets)
8 | [](https://marketplace.visualstudio.com/items?itemName=hollowtree.vue-snippets)
9 |
10 |
11 | ### It looks like:
12 | 
13 |
14 | 
15 |
16 |
17 | ### Snippets
18 | Including most of the API of Vue.js 2. You can type `vcom`, choose `VueConfigOptionMergeStrategies`, and press ENTER, then `Vue.config.optionMergeStrategies` appear on the screen.
19 |
20 | 插件的 Snippets 如下表格所示,比如你可以键入 `vcom` 然后按上下键选中 `VueConfigOptionMergeStrategies` 再按Enter键,就输入了`Vue.config.optionMergeStrategies`了。
21 |
22 | As shown in the table below, snippet `vmData` has body like `${this, vm}.$data` will provides choice `this.$data` and `vm.$data` to you.
23 |
24 | 如下表所示,`vmData` 的内容是 `${this, vm}.$data`,这表明这个 snippet 会提供 `this.$data` and `vm.$data` 两种选项供你选择。
25 |
26 | | Prefix | JavaScript Snippet Content |
27 | | ------ | ------------ |
28 | | `import` | `import ... from ...` |
29 | | `newVue` | `new Vue({...})` |
30 | | `VueConfigSilent` | `Vue.config.silent = true` |
31 | | `VueConfigOptionMergeStrategies` | `Vue.config.optionMergeStrategies` |
32 | | `VueConfigDevtools` | `Vue.config.devtools = true` |
33 | | `VueConfigErrorHandler` | `Vue.config.errorHandler = function (err, vm, info) {...}` |
34 | | `VueConfigWarnHandler` | `Vue.config.warnHandler = function (msg, vm, trace) {...}` |
35 | | `VueConfigIgnoredElements` | `Vue.config.ignoredElements = ['']` \
36 | | `VueConfigKeyCodes` | `Vue.config.keyCodes` |
37 | | `VueConfigPerformance` | `Vue.config.performance = true` |
38 | | `VueConfigProductionTip` | `Vue.config.productionTip = false` |
39 | | `vueExtend` | `Vue.extend( options )` |
40 | | `VueNextTick` | `Vue.nextTick( callback, [context] )` |
41 | | `VueNextTickThen` | `Vue.nextTick( callback, [context] ).then(function(){ })` |
42 | | `VueSet` | `Vue.set( target, key, value )` |
43 | | `VueDelete` | `Vue.delete( target, key )` |
44 | | `VueDirective` | `Vue.directive( id, [definition] )` |
45 | | `VueFilter` | `Vue.filter( id, [definition] )` |
46 | | `VueComponent` | `Vue.component( id, [definition] )` |
47 | | `VueUse` | `Vue.use( plugin )` |
48 | | `VueMixin` | `Vue.mixin({ mixin })` |
49 | | `VueCompile` | `Vue.compile( template )` |
50 | | `VueVersion` | `Vue.version` |
51 | | `data` | `data() { return {} }` |
52 | | `watchWithOptions` | `key: { deep: true, immediate: true, handler: function () { } }` |
53 | | `vmData` | `${this, vm}.$data` |
54 | | `vmProps` | `${this, vm}.$props` |
55 | | `vmEl` | `${this, vm}.$el` |
56 | | `vmOptions` | `${this, vm}.$options` |
57 | | `vmParent` | `${this, vm}.$parent` |
58 | | `vmRoot` | `${this, vm}.$root` |
59 | | `vmChildren` | `${this, vm}.$children` |
60 | | `vmSlots` | `${this, vm}.$slots` |
61 | | `vmScopedSlots` | `${this, vm}.$scopedSlots.default({})` |
62 | | `vmRefs` | `${this, vm}.$refs` |
63 | | `vmIsServer` | `${this, vm}.$isServer` |
64 | | `vmAttrs` | `${this, vm}.$attrs`|
65 | | `vmListeners` | `${this, vm}.listeners`|
66 | | `vmWatch` | `${this, vm}.$watch( expOrFn, callback, [options] )` |
67 | | `vmSet` | `${this, vm}.$set( object, key, value )` |
68 | | `vmDelete` | `${this, vm}.$delete( object, key )` |
69 | | `vmOn` | `${this, vm}.$on( event, callback )` |
70 | | `vmOnce` | `${this, vm}.$once( event, callback )` |
71 | | `vmOff` | `${this, vm}.$off( [event, callback] )` |
72 | | `vmEmit` | `${this, vm}.$emit( event, […args] )` |
73 | | `vmMount` | `${this, vm}.$mount( [elementOrSelector] )` |
74 | | `vmForceUpdate` | `${this, vm}.$forceUpdate()` |
75 | | `vmNextTick` | `${this, vm}.$nextTick( callback )` |
76 | | `vmDestroy` | `${this, vm}.$destroy()` |
77 | | `renderer` | `const renderer = require('vue-server-renderer').createRenderer()` |
78 | | `createRenderer` | `createRenderer({ })` |
79 | | `preventDefault` | `preventDefault();` |
80 | | `stopPropagation` | `stopPropagation();` |
81 |
82 |
83 |
84 | | Prefix | HTML Snippet Content |
85 | | ------ | ------------ |
86 | | `template` | `` |
87 | | `script` | `` |
88 | | `style` | `` |
89 | | `vText` | `v-text=msg` |
90 | | `vHtml` | `v-html=html` |
91 | | `vShow` | `v-show` |
92 | | `vIf` | `v-if` |
93 | | `vElse` | `v-else` |
94 | | `vElseIf` | `v-else-if` |
95 | | `vForWithoutKey` | `v-for` |
96 | | `vFor` | `v-for="" :key=""` |
97 | | `vOn` | `v-on` |
98 | | `vBind` | `v-bind` |
99 | | `vModel` | `v-model` |
100 | | `vPre` | `v-pre` |
101 | | `vCloak` | `v-cloak` |
102 | | `vOnce` | `v-once` |
103 | | `key` | `:key` |
104 | | `ref` | `ref`|
105 | | `slotA` | `slot=""`|
106 | | `slotE` | ``|
107 | | `slotScope` | `slot-scope=""`|
108 | | `component` | ``|
109 | | `keepAlive` | `` |
110 | | `transition` | `` |
111 | | `transitionGroup` | `` |
112 | | `enterClass` | `enter-class=''`|
113 | | `leaveClass` | `leave-class=''`|
114 | | `appearClass` | `appear-class=''`|
115 | | `enterToClass` | `enter-to-class=''`|
116 | | `leaveToClass` | `leave-to-class=''`|
117 | | `appearToClass` | `appear-to-class=''`|
118 | | `enterActiveClass` | `enter-active-class=''`|
119 | | `leaveActiveClass` | `leave-active-class=''`|
120 | | `appearActiveClass` | `appear-active-class=''`|
121 | | `beforeEnterEvent` | `@before-enter=''`|
122 | | `beforeLeaveEvent` | `@before-leave=''`|
123 | | `beforeAppearEvent` | `@before-appear=''`|
124 | | `enterEvent` | `@enter=''`|
125 | | `leaveEvent` | `@leave=''`|
126 | | `appearEvent` | `@appear=''`|
127 | | `afterEnterEvent` | `@after-enter=''`|
128 | | `afterLeaveEvent` | `@after-leave=''`|
129 | | `afterAppearEvent` | `@after-appear=''`|
130 | | `enterCancelledEvent` | `@enter-cancelled=''`|
131 | | `leaveCancelledEvent` | `@leave-cancelled=''`|
132 | | `appearCancelledEvent` | `@appear-cancelled=''`|
133 |
134 |
135 |
136 | | Prefix | Vue Router Snippet Content |
137 | | ------ | ------------ |
138 | | `routerLink` | `` |
139 | | `routerView` | `` |
140 | | `to` | `to=""` |
141 | | `tag` | `tag=""` |
142 | | `newVueRouter` | `const router = newVueRouter({ })` |
143 | | `routerBeforeEach` | `router.beforeEach((to, from, next) => { }` |
144 | | `routerBeforeResolve` | `router.beforeResolve((to, from, next) => { }` |
145 | | `routerAfterEach` | `router.afterEach((to, from) => { }` |
146 | | `routerPush` | `router.push()` |
147 | | `routerReplace` | `router.replace()` |
148 | | `routerGo` | `router.back()` |
149 | | `routerBack` | `router.push()` |
150 | | `routerForward` | `router.forward()` |
151 | | `routerGetMatchedComponents` | `router.getMatchedComponents()` |
152 | | `routerResolve` | `router.resolve()` |
153 | | `routerAddRoutes` | `router.addRoutes()` |
154 | | `routerOnReady` | `router.onReady()` |
155 | | `routerOnError` | `router.onError()` |
156 | | `routes` | `routes: []` |
157 | | `beforeEnter` | `beforeEnter: (to, from, next) => { }` |
158 | | `beforeRouteEnter` | `beforeRouteEnter (to, from, next) { }` |
159 | | `beforeRouteLeave` | `beforeRouteLeave (to, from, next) { }` |
160 | | `scrollBehavior` | `scrollBehavior (to, from, savedPosition) { }` |
161 |
162 |
163 |
164 | | Prefix | Vuex Snippet Content |
165 | | ------ | ------------ |
166 | | `newVuexStore` | `const store = new Vuex.Store({ })` |
167 |
168 | | Prefix | Nuxt.js Snippet Content |
169 | | ------ | ------------ |
170 | | `nuxt` | `` |
171 | | `nuxtChild` | `` |
172 | | `nuxtLink` | `` |
173 | | `asyncData` | `asyncData() {}` |
174 |
175 | ### Supported languages
176 | * vue(.vue)
177 | * HTML(.html)
178 | * javascript(.js)
179 | * typescript(.ts)
180 | * pug(.pug)
181 |
182 | ### Base on
183 | [vue-syntax-highlight (vue.tmLanguage)](https://github.com/vuejs/vue-syntax-highlight/blob/master/vue.tmLanguage)
184 |
185 | --------------------------------------
186 | ##### 2020/07/27 (0.1.12)
187 | * Add snippets and fix bugs
188 |
189 | ##### 2019/01/27 (0.1.11)
190 | * Fix snippets
191 |
192 | ##### 2018/12/19 (0.1.10)
193 | * Update snippets (like `watchWithOptions` / `asyncData` / `nuxt` / `nuxtChild` / `nuxtLink` and so on)
194 |
195 | ##### 2018/09/04 (0.1.9)
196 | * Update snippets
197 |
198 | ##### 2018/06/24 (0.1.8)
199 | * Update snippets
200 |
201 | ##### 2018/06/05 (0.1.7)
202 | * Update snippets, add choices(`this` and `vm`) to snippets that begin with `vm`.
203 |
204 | ##### 2018/05/22 (0.1.6)
205 | * Update snippets
206 |
207 | ##### 2017/09/17 (0.1.5)
208 | * Fix and update snippets
209 |
210 | ##### 2017/03/12 (0.1.1)
211 | * Add support .pug files (thanks to [Gregory Bass](https://github.com/GriNAME))
212 |
213 | ##### 2017/01/01 (0.1.0)
214 | * Update some snippets
215 |
216 | ##### 2016/12/31 (0.0.10)
217 | * Update newest api snippets (like `v-else-if` / `Vue.config.ignoredElements` and so on)
218 | * Fix a bug (before: `vm.off`,after:`vm.$off`)
219 |
220 | ##### 2016/12/15 (0.0.9)
221 | * Update newest syntax highlight file
222 |
223 | ##### 2016/11/13 (0.0.8)
224 | * Add some snippets
225 | * Change this extension's logo to vue's logo
226 | * Update readme
227 |
228 | ##### 2016/10/18 (0.0.7)
229 | * Fix `v-for` snippet (thanks to [Daniel D](https://github.com/djx339))
230 |
231 | ##### 2016/10/18 (0.0.6)
232 | * Publish failed
233 |
234 | ##### 2016/10/16 (0.0.5)
235 | * Fix this extension can not be downloaded with the latest version(1.6.1) of VS code
236 |
237 | ##### 2016/10/15 (0.0.4)
238 | * Update readme
239 |
240 | ##### 2016/09/30 (0.0.1)
241 | * Add code snippets
242 | * Add syntax highlight
243 |
--------------------------------------------------------------------------------
/img/VueInit.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hollowtree/vscode-vue-snippets/6d1c4f6b20e289d6c15a2f9ad87c47d0b4bbdefc/img/VueInit.gif
--------------------------------------------------------------------------------
/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hollowtree/vscode-vue-snippets/6d1c4f6b20e289d6c15a2f9ad87c47d0b4bbdefc/img/logo.png
--------------------------------------------------------------------------------
/img/show.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hollowtree/vscode-vue-snippets/6d1c4f6b20e289d6c15a2f9ad87c47d0b4bbdefc/img/show.png
--------------------------------------------------------------------------------
/img/show1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hollowtree/vscode-vue-snippets/6d1c4f6b20e289d6c15a2f9ad87c47d0b4bbdefc/img/show1.png
--------------------------------------------------------------------------------
/img/show2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hollowtree/vscode-vue-snippets/6d1c4f6b20e289d6c15a2f9ad87c47d0b4bbdefc/img/show2.png
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-snippets",
3 | "displayName": "Vue 2 Snippets",
4 | "author": "hollowtree",
5 | "publisher": "hollowtree",
6 | "icon": "img/logo.png",
7 | "description": "A Vue.js 2 Extension",
8 | "license": "MIT",
9 | "version": "0.1.12",
10 | "engines": {
11 | "vscode": "^1.5.0"
12 | },
13 | "keywords": [
14 | "javascript",
15 | "snippet",
16 | "vue",
17 | "vue 2"
18 | ],
19 | "categories": [
20 | "Programming Languages",
21 | "Snippets"
22 | ],
23 | "repository": {
24 | "type": "git",
25 | "url": "https://github.com/hollowtree/vscode-vue-snippets"
26 | },
27 | "bugs": {
28 | "url": "https://github.com/hollowtree/vscode-vue-snippets/issues",
29 | "email": "smalltree@outlook.com"
30 | },
31 | "contributes": {
32 | "languages": [
33 | {
34 | "id": "vue",
35 | "aliases": [
36 | "Vue",
37 | "vue"
38 | ],
39 | "extensions": [
40 | ".vue"
41 | ]
42 | }
43 | ],
44 | "snippets": [
45 | {
46 | "language": "javascript",
47 | "path": "./snippets/javascript.json"
48 | },
49 | {
50 | "language": "typescript",
51 | "path": "./snippets/javascript.json"
52 | },
53 | {
54 | "language": "html",
55 | "path": "./snippets/html.json"
56 | },
57 | {
58 | "language": "vue-html",
59 | "path": "./snippets/html.json"
60 | },
61 | {
62 | "language": "html",
63 | "path": "./snippets/vue.json"
64 | },
65 | {
66 | "language": "vue",
67 | "path": "./snippets/javascript.json"
68 | },
69 | {
70 | "language": "vue",
71 | "path": "./snippets/html.json"
72 | },
73 | {
74 | "language": "vue",
75 | "path": "./snippets/vue.json"
76 | },
77 | {
78 | "language": "jade",
79 | "path": "./snippets/pug.json"
80 | }
81 | ]
82 | }
83 | }
--------------------------------------------------------------------------------
/snippets/html.json:
--------------------------------------------------------------------------------
1 | {
2 | "template": {
3 | "prefix": "template",
4 | "body": [
5 | "",
6 | "\t<${1:div}$2>",
7 | "\t\t$0",
8 | "\t${1:div}>",
9 | ""
10 | ],
11 | "description": "template element"
12 | },
13 | "v-text": {
14 | "prefix": "vText",
15 | "body": [
16 | "v-text=\"${1:msg}\""
17 | ],
18 | "description": "Expects: string. Updates the element’s textContent."
19 | },
20 | "v-html": {
21 | "prefix": "vHtml",
22 | "body": [
23 | "v-html=\"${1:html}\""
24 | ],
25 | "description": "Expects: string. Updates the element’s innerHTML."
26 | },
27 | "v-show": {
28 | "prefix": "vShow",
29 | "body": [
30 | "v-show=\"${1:condition}\""
31 | ],
32 | "description": "Expects: any"
33 | },
34 | "v-if": {
35 | "prefix": "vIf",
36 | "body": [
37 | "v-if=\"${1:condition}\""
38 | ],
39 | "description": "Expects: any"
40 | },
41 | "v-else": {
42 | "prefix": "vElse",
43 | "body": [
44 | "v-else"
45 | ],
46 | "description": "Does not expect expression. previous sibling element must have v-if or v-else-if."
47 | },
48 | "v-else-if": {
49 | "prefix": "vElseIf",
50 | "body": [
51 | "v-else-if=\"${1:condition}\""
52 | ],
53 | "description": "Expects: any. previous sibling element must have v-if or v-else-if."
54 | },
55 | "v-for-without-key": {
56 | "prefix": "vForWithoutKey",
57 | "body": [
58 | "v-for=\"${1:item} in ${2:items}\""
59 | ],
60 | "description": "Expects: Array | Object | number | string"
61 | },
62 | "v-for": {
63 | "prefix": "vFor",
64 | "body": [
65 | "v-for=\"(${1:item}, ${2:index}) in ${3:items}\" :key=\"${4:index}\""
66 | ],
67 | "description": "Expects: Array | Object | number | string"
68 | },
69 | "v-on": {
70 | "prefix": "vOn",
71 | "body": [
72 | "v-on:${1:event}=\"${2:handle}\""
73 | ],
74 | "description": "Expects: Function | Inline Statement"
75 | },
76 | "v-bind": {
77 | "prefix": "vBind",
78 | "body": [
79 | "v-bind$1=\"${2}\""
80 | ],
81 | "description": "Expects: any (with argument) | Object (without argument)"
82 | },
83 | "v-model": {
84 | "prefix": "vModel",
85 | "body": [
86 | "v-model=\"${1:something}\""
87 | ],
88 | "description": "Expects: varies based on value of form inputs element or output of components"
89 | },
90 | "v-slot": {
91 | "prefix": "vSlot",
92 | "body": [
93 | "v-slot$1=\"${2}\""
94 | ],
95 | "description": "Expects: JavaScript expression that is valid in a function argument position (supports destructuring in supported environments). Optional - only needed if expecting props to be passed to the slot."
96 | },
97 | "v-pre": {
98 | "prefix": "vPre",
99 | "body": [
100 | "v-pre"
101 | ],
102 | "description": "Does not expect expression"
103 | },
104 | "v-cloak": {
105 | "prefix": "vCloak",
106 | "body": [
107 | "v-cloak"
108 | ],
109 | "description": "Does not expect expression"
110 | },
111 | "v-once": {
112 | "prefix": "vOnce",
113 | "body": [
114 | "v-once"
115 | ],
116 | "description": "Does not expect expression"
117 | },
118 | "key": {
119 | "prefix": "key",
120 | "body": [
121 | ":key=\"${1:key}\""
122 | ],
123 | "description": "Expects: string. Children of the same common parent must have unique keys. Duplicate keys will cause render errors."
124 | },
125 | "ref": {
126 | "prefix": "ref",
127 | "body": [
128 | "ref=\"${1:reference}\"$0"
129 | ],
130 | "description": "Expects: string. ref is used to register a reference to an element or a child component. The reference will be registered under the parent component’s $refs object. If used on a plain DOM element, the reference will be that element; if used on a child component, the reference will be component instance."
131 | },
132 | "slotA": {
133 | "prefix": "slotA",
134 | "body": [
135 | "slot=\"$1\"$0"
136 | ],
137 | "description": "slot=''. Expects: string. Used on content inserted into child components to indicate which named slot the content belongs to."
138 | },
139 | "slotE": {
140 | "prefix": "slotE",
141 | "body": [
142 | "$2$0"
143 | ],
144 | "description": ". Expects: string. Used on content inserted into child components to indicate which named slot the content belongs to."
145 | },
146 | "slotScope": {
147 | "prefix": "slotScope",
148 | "body": [
149 | "slot-scope=\"$1\"$0"
150 | ],
151 | "description": "Used to denote an element or component as a scoped slot. The attribute’s value should be a valid JavaScript expression that can appear in the argument position of a function signature. This means in supported environments you can also use ES2015 destructuring in the expression. Serves as a replacement for scope in 2.5.0+."
152 | },
153 | "scope": {
154 | "prefix": "scope",
155 | "body": [
156 | "scope=\"${1:this api replaced by slot-scope in 2.5.0+}\"$0"
157 | ],
158 | "description": "Used to denote a element as a scoped slot, which is replaced by `slot-scope` in 2.5.0+."
159 | },
160 | "component": {
161 | "prefix": "component",
162 | "body": [
163 | "$0"
164 | ],
165 | "description": "component element"
166 | },
167 | "keep-alive": {
168 | "prefix": "keepAlive",
169 | "body": [
170 | "",
171 | "$2",
172 | "$0"
173 | ],
174 | "description": "keep-alive element"
175 | },
176 | "transition": {
177 | "prefix": "transition",
178 | "body": [
179 | "",
180 | "$2",
181 | "$0"
182 | ],
183 | "description": "transition element"
184 | },
185 | "transition-group": {
186 | "prefix": "transitionGroup",
187 | "body": [
188 | "",
189 | "$2",
190 | ""
191 | ],
192 | "description": "transition-group element"
193 | },
194 | "enter-class": {
195 | "prefix": "enterClass",
196 | "body": [
197 | "enter-class=\"$1\"$0"
198 | ],
199 | "description": "enter-class=''. Expects: string."
200 | },
201 | "leave-class": {
202 | "prefix": "leaveClass",
203 | "body": [
204 | "leave-class=\"$1\"$0"
205 | ],
206 | "description": "leave-class=''. Expects: string."
207 | },
208 | "appear-class": {
209 | "prefix": "appearClass",
210 | "body": [
211 | "appear-class=\"$1\"$0"
212 | ],
213 | "description": "appear-class=''. Expects: string."
214 | },
215 | "enter-to-class": {
216 | "prefix": "enterToClass",
217 | "body": [
218 | "enter-to-class=\"$1\"$0"
219 | ],
220 | "description": "enter-to-class=''. Expects: string."
221 | },
222 | "leave-to-class": {
223 | "prefix": "leaveToClass",
224 | "body": [
225 | "leave-to-class=\"$1\"$0"
226 | ],
227 | "description": "leave-to-class=''. Expects: string."
228 | },
229 | "appear-to-class": {
230 | "prefix": "appearToClass",
231 | "body": [
232 | "appear-to-class=\"$1\"$0"
233 | ],
234 | "description": "appear-to-class=''. Expects: string."
235 | },
236 | "enter-active-class": {
237 | "prefix": "enterActiveClass",
238 | "body": [
239 | "enter-active-class=\"$1\"$0"
240 | ],
241 | "description": "enter-active-class=''. Expects: string."
242 | },
243 | "leave-active-class": {
244 | "prefix": "leaveActiveClass",
245 | "body": [
246 | "leave-active-class=\"$1\"$0"
247 | ],
248 | "description": "leave-active-class=''. Expects: string."
249 | },
250 | "appear-active-class": {
251 | "prefix": "appearActiveClass",
252 | "body": [
253 | "appear-active-class=\"$1\"$0"
254 | ],
255 | "description": "appear-active-class=''. Expects: string."
256 | },
257 | "before-enter": {
258 | "prefix": "beforeEnterEvent",
259 | "body": [
260 | "@before-enter=\"$1\"$0"
261 | ],
262 | "description": "@before-enter=''"
263 | },
264 | "before-leave": {
265 | "prefix": "beforeLeaveEvent",
266 | "body": [
267 | "@before-leave=\"$1\"$0"
268 | ],
269 | "description": "@before-leave=''"
270 | },
271 | "before-appear": {
272 | "prefix": "beforeAppearEvent",
273 | "body": [
274 | "@before-appear=\"$1\"$0"
275 | ],
276 | "description": "@before-appear=''"
277 | },
278 | "enter": {
279 | "prefix": "enterEvent",
280 | "body": [
281 | "@enter=\"$1\"$0"
282 | ],
283 | "description": "@enter=''"
284 | },
285 | "leave": {
286 | "prefix": "leaveEvent",
287 | "body": [
288 | "@leave=\"$1\"$0"
289 | ],
290 | "description": "@leave=''"
291 | },
292 | "appear": {
293 | "prefix": "appearEvent",
294 | "body": [
295 | "@appear=\"$1\"$0"
296 | ],
297 | "description": "@appear=''"
298 | },
299 | "after-enter": {
300 | "prefix": "afterEnterEvent",
301 | "body": [
302 | "@after-enter=\"$1\"$0"
303 | ],
304 | "description": "@after-enter=''"
305 | },
306 | "after-leave": {
307 | "prefix": "afterLeaveEvent",
308 | "body": [
309 | "@after-leave=\"$1\"$0"
310 | ],
311 | "description": "@after-leave=''"
312 | },
313 | "after-appear": {
314 | "prefix": "afterAppearEvent",
315 | "body": [
316 | "@after-appear=\"$1\"$0"
317 | ],
318 | "description": "@after-appear=''"
319 | },
320 | "enter-cancelled": {
321 | "prefix": "enterCancelledEvent",
322 | "body": [
323 | "@enter-cancelled=\"$1\"$0"
324 | ],
325 | "description": "@enter-cancelled=''"
326 | },
327 | "leave-cancelled": {
328 | "prefix": "leaveCancelledEvent",
329 | "body": [
330 | "@leave-cancelled=\"$1\"$0"
331 | ],
332 | "description": "@leave-cancelled='' (v-show only)"
333 | },
334 | "appear-cancelled": {
335 | "prefix": "appearCancelledEvent",
336 | "body": [
337 | "@appear-cancelled=\"$1\"$0"
338 | ],
339 | "description": "@appear-cancelled=''"
340 | },
341 | "routerLink": {
342 | "prefix": "routerLink",
343 | "body": [
344 | "$2$0"
345 | ],
346 | "description": "router-link element"
347 | },
348 | "routerLinkTo": {
349 | "prefix": "routerLinkTo",
350 | "body": [
351 | "$2$0"
352 | ],
353 | "description": ". router-link element"
354 | },
355 | "to": {
356 | "prefix": "to",
357 | "body": [
358 | "to=\"$1\"$0"
359 | ],
360 | "description": "to=''"
361 | },
362 | "tag": {
363 | "prefix": "tag",
364 | "body": [
365 | "tag=\"$1\"$0"
366 | ],
367 | "description": "tag=''"
368 | },
369 | "routerView": {
370 | "prefix": "routerView",
371 | "body": [
372 | "$1$0"
373 | ],
374 | "description": "router-view element"
375 | },
376 | "nuxt": {
377 | "prefix": "nuxt",
378 | "body": [
379 | ""
380 | ],
381 | "description": "This component is used only in layouts to display the page components."
382 | },
383 | "nuxtChild": {
384 | "prefix": "nuxtChild",
385 | "body": [
386 | "$0"
387 | ],
388 | "description": "This component is used for displaying the children components in a nested route."
389 | },
390 | "nuxtLink": {
391 | "prefix": "nuxtLink",
392 | "body": [
393 | "$0"
394 | ],
395 | "description": "This component is used to provide navigations between page components."
396 | }
397 | }
--------------------------------------------------------------------------------
/snippets/javascript.json:
--------------------------------------------------------------------------------
1 | {
2 | "import": {
3 | "prefix": "import",
4 | "body": [
5 | "import $1 from '$2'"
6 | ],
7 | "description": "import ... from ..."
8 | },
9 | "vue": {
10 | "prefix": "newVue",
11 | "body": [
12 | "new Vue({",
13 | "\t$1",
14 | "})"
15 | ],
16 | "description": "new Vue()"
17 | },
18 | "silent": {
19 | "prefix": "VueConfigSilent",
20 | "body": [
21 | "Vue.config.silent = ${1:true}"
22 | ],
23 | "description": "Vue.config.silent"
24 | },
25 | "optionMergeStrategies": {
26 | "prefix": "VueConfigOptionMergeStrategies",
27 | "body": [
28 | "Vue.config.optionMergeStrategies$1"
29 | ],
30 | "description": "Vue.config.optionMergeStrategies"
31 | },
32 | "devtools": {
33 | "prefix": "VueConfigDevtools",
34 | "body": [
35 | "Vue.config.devtools = ${1:true}"
36 | ],
37 | "description": "Vue.config.devtools"
38 | },
39 | "errorHandler": {
40 | "prefix": "VueConfigErrorHandler",
41 | "body": [
42 | "Vue.config.errorHandler = function (err, vm, info) {",
43 | "\t${1:// handle error}",
44 | "}"
45 | ],
46 | "description": "Vue.config.errorHandler"
47 | },
48 | "warnHandler": {
49 | "prefix": "VueConfigWarnHandler",
50 | "body": [
51 | "Vue.config.warnHandler = function (msg, vm, trace) {",
52 | "\t${1:// handle warn}",
53 | "}"
54 | ],
55 | "description": "Vue.config.warnHandler"
56 | },
57 | "ignoredElements": {
58 | "prefix": "VueConfigIgnoredElements",
59 | "body": [
60 | "Vue.config.ignoredElements = [",
61 | "\t'${1}'",
62 | "]$0"
63 | ],
64 | "description": "Vue.config.ignoredElements"
65 | },
66 | "keyCodes": {
67 | "prefix": "VueConfigKeyCodes",
68 | "body": [
69 | "Vue.config.keyCodes = {",
70 | "\t${1:// camelCase won`t work}",
71 | "}"
72 | ],
73 | "description": "Vue.config.keyCodes"
74 | },
75 | "performance": {
76 | "prefix": "VueConfigPerformance",
77 | "body": [
78 | "Vue.config.performance = ${1:true}"
79 | ],
80 | "description": "Vue.config.performance"
81 | },
82 | "productionTip": {
83 | "prefix": "VueConfigProductionTip",
84 | "body": [
85 | "Vue.config.productionTip = ${1:false}"
86 | ],
87 | "description": "Vue.config.productionTip"
88 | },
89 | "extend": {
90 | "prefix": "vueExtend",
91 | "body": [
92 | "Vue.extend({",
93 | "\ttemplate:${1:template}",
94 | "})"
95 | ],
96 | "description": "Vue.extend( options )"
97 | },
98 | "nextTick": {
99 | "prefix": "VueNextTick",
100 | "body": [
101 | "Vue.nextTick({",
102 | "\t$1",
103 | "})"
104 | ],
105 | "description": "Vue.nextTick( callback, [context] )"
106 | },
107 | "nextTickThen": {
108 | "prefix": "VueNextTickThen",
109 | "body": [
110 | "Vue.nextTick({",
111 | "\t$1",
112 | "}).then(function ($2) {",
113 | "\t$3",
114 | "})"
115 | ],
116 | "description": "Vue.nextTick( callback, [context] ).then(function(){ })"
117 | },
118 | "set": {
119 | "prefix": "VueSet",
120 | "body": [
121 | "Vue.set(${1:target}, ${2:key}, ${3:value})"
122 | ],
123 | "description": "Vue.set( target, key, value )"
124 | },
125 | "delete": {
126 | "prefix": "VueDelete",
127 | "body": [
128 | "Vue.delete(${1:target}, ${2:key})"
129 | ],
130 | "description": "Vue.delete( target, key )"
131 | },
132 | "directive": {
133 | "prefix": "VueDirective",
134 | "body": [
135 | "Vue.directive(${1:id}${2:, [definition]})"
136 | ],
137 | "description": "Vue.directive( id, [definition] )"
138 | },
139 | "filter": {
140 | "prefix": "VueFilter",
141 | "body": [
142 | "Vue.filter(${1:id}${2:, [definition]})"
143 | ],
144 | "description": "Vue.filter( id, [definition] )"
145 | },
146 | "component": {
147 | "prefix": "VueComponent",
148 | "body": [
149 | "Vue.component(${1:id}${2:, [definition]})$0"
150 | ],
151 | "description": "Vue.component( id, [definition] )"
152 | },
153 | "use": {
154 | "prefix": "VueUse",
155 | "body": [
156 | "Vue.use(${1:plugin})$0"
157 | ],
158 | "description": "Vue.use( plugin )"
159 | },
160 | "mixin": {
161 | "prefix": "VueMixin",
162 | "body": [
163 | "Vue.mixin({${1:mixin}})"
164 | ],
165 | "description": "Vue.mixin( mixin )"
166 | },
167 | "compile": {
168 | "prefix": "VueCompile",
169 | "body": [
170 | "Vue.compile(${1:template})"
171 | ],
172 | "description": "Vue.compile( template )"
173 | },
174 | "observable": {
175 | "prefix": "VueObservable",
176 | "body": [
177 | "Vue.observable({${1:object}})"
178 | ],
179 | "description": "Vue.observable( object )"
180 | },
181 | "version": {
182 | "prefix": "VueVersion",
183 | "body": [
184 | "Vue.version$0"
185 | ],
186 | "description": "Vue.version.split('.')[]"
187 | },
188 | "data": {
189 | "prefix": "data",
190 | "body": [
191 | "data() {",
192 | "\treturn {",
193 | "\t\t$1",
194 | "\t}",
195 | "},$0"
196 | ],
197 | "description": "The data object for the Vue instance."
198 | },
199 | "props": {
200 | "prefix": "props",
201 | "body": [
202 | "props"
203 | ],
204 | "description": "A list/hash of attributes that are exposed to accept data from the parent component. "
205 | },
206 | "propsData": {
207 | "prefix": "propsData",
208 | "body": [
209 | "propsData"
210 | ],
211 | "description": "Restriction: only respected in instance creation via `new`. Pass props to an instance during its creation. This is primarily intended to make unit testing easier."
212 | },
213 | "scopedSlots": {
214 | "prefix": "scopedSlots",
215 | "body": [
216 | "scopedSlots"
217 | ],
218 | "description": "just a word"
219 | },
220 | "computed": {
221 | "prefix": "computed",
222 | "body": [
223 | "computed: {",
224 | "\t$1",
225 | "},$0"
226 | ],
227 | "description": "Computed properties to be mixed into the Vue instance. "
228 | },
229 | "methods": {
230 | "prefix": "methods",
231 | "body": [
232 | "methods: {",
233 | "\t$1",
234 | "},$0"
235 | ],
236 | "description": "Methods to be mixed into the Vue instance."
237 | },
238 | "watch": {
239 | "prefix": "watch",
240 | "body": [
241 | "watch: {",
242 | "\t$1",
243 | "},$0"
244 | ],
245 | "description": "An object where keys are expressions to watch and values are the corresponding callbacks. The value can also be a string of a method name, or an Object that contains additional options. Note that you should not use an arrow function to define a watcher."
246 | },
247 | "watchWithOptions": {
248 | "prefix": "watchWithOptions",
249 | "body": [
250 | "${1:key}: {",
251 | "\tdeep: ${2:true},",
252 | "\timmediate: ${3:true},",
253 | "\thandler: function (${4:val}, ${5:oldVal}) {",
254 | "\t\t$6",
255 | "\t}",
256 | "},$0"
257 | ],
258 | "description": "Vue Watcher with options."
259 | },
260 | "el": {
261 | "prefix": "el",
262 | "body": [
263 | "el"
264 | ],
265 | "description": "just a word"
266 | },
267 | "template": {
268 | "prefix": "template",
269 | "body": [
270 | "template"
271 | ],
272 | "description": "just a word"
273 | },
274 | "render": {
275 | "prefix": "render",
276 | "body": [
277 | "render(h) {",
278 | "\t$1",
279 | "},"
280 | ],
281 | "description": "An alternative to string templates allowing you to leverage the full programmatic power of JavaScript."
282 | },
283 | "renderError": {
284 | "prefix": "renderError",
285 | "body": [
286 | "renderError(h, err) {",
287 | "\t$1",
288 | "},"
289 | ],
290 | "description": "Provide an alternative render output when the default render function encounters an error."
291 | },
292 | "beforeCreate": {
293 | "prefix": "beforeCreate",
294 | "body": [
295 | "beforeCreate() {",
296 | "\t$1",
297 | "},"
298 | ],
299 | "description": "Type: Function."
300 | },
301 | "created": {
302 | "prefix": "created",
303 | "body": [
304 | "created() {",
305 | "\t$1",
306 | "},"
307 | ],
308 | "description": "Type: Function."
309 | },
310 | "beforeMount": {
311 | "prefix": "beforeMount",
312 | "body": [
313 | "beforeMount() {",
314 | "\t$1",
315 | "},"
316 | ],
317 | "description": "Type: Function."
318 | },
319 | "mounted": {
320 | "prefix": "mounted",
321 | "body": [
322 | "mounted() {",
323 | "\t$1",
324 | "},"
325 | ],
326 | "description": "Type: Function."
327 | },
328 | "beforeUpdate": {
329 | "prefix": "beforeUpdate",
330 | "body": [
331 | "beforeUpdate() {",
332 | "\t$1",
333 | "},"
334 | ],
335 | "description": "Type: Function."
336 | },
337 | "updated": {
338 | "prefix": "updated",
339 | "body": [
340 | "updated() {",
341 | "\t$1",
342 | "},"
343 | ],
344 | "description": "Type: Function."
345 | },
346 | "activated": {
347 | "prefix": "activated",
348 | "body": [
349 | "activated() {",
350 | "\t$1",
351 | "},"
352 | ],
353 | "description": "Type: Function."
354 | },
355 | "deactivated": {
356 | "prefix": "deactivated",
357 | "body": [
358 | "deactivated() {",
359 | "\t$1",
360 | "},"
361 | ],
362 | "description": "Type: Function."
363 | },
364 | "beforeDestroy": {
365 | "prefix": "beforeDestroy",
366 | "body": [
367 | "beforeDestroy() {",
368 | "\t$1",
369 | "},"
370 | ],
371 | "description": "Type: Function."
372 | },
373 | "destroyed": {
374 | "prefix": "destroyed",
375 | "body": [
376 | "destroyed() {",
377 | "\t$1",
378 | "},"
379 | ],
380 | "description": "Type: Function."
381 | },
382 | "errorCaptured": {
383 | "prefix": "errorCaptured",
384 | "body": [
385 | "errorCaptured: (err, vm, info) => {",
386 | "\t$1",
387 | "},"
388 | ],
389 | "description": "Type: (err: Error, vm: Component, info: string) => ?boolean"
390 | },
391 | "directives": {
392 | "prefix": "directives",
393 | "body": [
394 | "directives"
395 | ],
396 | "description": "just a word"
397 | },
398 | "filters": {
399 | "prefix": "filters",
400 | "body": [
401 | "filters"
402 | ],
403 | "description": "just a word"
404 | },
405 | "componentWord": {
406 | "prefix": "component",
407 | "body": [
408 | "component"
409 | ],
410 | "description": "just a word"
411 | },
412 | "components": {
413 | "prefix": "components",
414 | "body": [
415 | "components"
416 | ],
417 | "description": "just a word"
418 | },
419 | "parent": {
420 | "prefix": "parent",
421 | "body": [
422 | "parent"
423 | ],
424 | "description": "just a word"
425 | },
426 | "mixins": {
427 | "prefix": "mixins",
428 | "body": [
429 | "mixins"
430 | ],
431 | "description": "just a word"
432 | },
433 | "extends": {
434 | "prefix": "extends",
435 | "body": [
436 | "extends"
437 | ],
438 | "description": "just a word"
439 | },
440 | "provide": {
441 | "prefix": "provide",
442 | "body": [
443 | "provide"
444 | ],
445 | "description": "just a word"
446 | },
447 | "inject": {
448 | "prefix": "inject",
449 | "body": [
450 | "inject"
451 | ],
452 | "description": "just a word"
453 | },
454 | "name": {
455 | "prefix": "name",
456 | "body": [
457 | "name"
458 | ],
459 | "description": "just a word"
460 | },
461 | "delimiters": {
462 | "prefix": "delimiters",
463 | "body": [
464 | "delimiters"
465 | ],
466 | "description": "just a word"
467 | },
468 | "functional": {
469 | "prefix": "functional",
470 | "body": [
471 | "functional"
472 | ],
473 | "description": "just a word"
474 | },
475 | "model": {
476 | "prefix": "model",
477 | "body": [
478 | "model"
479 | ],
480 | "description": "just a word"
481 | },
482 | "inheritAttrs": {
483 | "prefix": "inheritAttrs",
484 | "body": [
485 | "inheritAttrs"
486 | ],
487 | "description": "just a word"
488 | },
489 | "comments": {
490 | "prefix": "comments",
491 | "body": [
492 | "comments"
493 | ],
494 | "description": "just a word"
495 | },
496 | "deep": {
497 | "prefix": "deep",
498 | "body": [
499 | "deep"
500 | ],
501 | "description": "just a word"
502 | },
503 | "immediate": {
504 | "prefix": "immediate",
505 | "body": [
506 | "immediate"
507 | ],
508 | "description": "just a word"
509 | },
510 | "vm.$data": {
511 | "prefix": "vmData",
512 | "body": [
513 | "${1|this,vm|}.\\$data$2"
514 | ],
515 | "description": "Type: Object. Read only."
516 | },
517 | "vm.$props": {
518 | "prefix": "vmProps",
519 | "body": [
520 | "${1|this,vm|}.\\$props$2"
521 | ],
522 | "description": "Type: Object. Read only."
523 | },
524 | "vm.$el": {
525 | "prefix": "vmEl",
526 | "body": [
527 | "${1|this,vm|}.\\$el$2"
528 | ],
529 | "description": "Type: HTMLElement. Read only."
530 | },
531 | "vm.$options": {
532 | "prefix": "vmOptions",
533 | "body": [
534 | "${1|this,vm|}.\\$options$2"
535 | ],
536 | "description": "Type: Object. Read only."
537 | },
538 | "vm.$parent": {
539 | "prefix": "vmParent",
540 | "body": [
541 | "${1|this,vm|}.\\$parent$2"
542 | ],
543 | "description": "Type: Vue instance. Read only."
544 | },
545 | "vm.$root": {
546 | "prefix": "vmRoot",
547 | "body": [
548 | "${1|this,vm|}.\\$root$2"
549 | ],
550 | "description": "Type: Vue instance. Read only."
551 | },
552 | "vm.$children": {
553 | "prefix": "vmChildren",
554 | "body": [
555 | "${1|this,vm|}.\\$children$2"
556 | ],
557 | "description": "Type: Array. Read only."
558 | },
559 | "vm.$slots": {
560 | "prefix": "vmSlots",
561 | "body": [
562 | "${1|this,vm|}.\\$slots$2"
563 | ],
564 | "description": "Type: Object. Read only."
565 | },
566 | "vm.$scopedSlots": {
567 | "prefix": "vmScopedSlots",
568 | "body": [
569 | "${1|this,vm|}.\\$scopedSlots.default({",
570 | "\t$2",
571 | "})"
572 | ],
573 | "description": "Type: { [name: string]: props => VNode | Array }. Read only."
574 | },
575 | "vm.$refs": {
576 | "prefix": "vmRefs",
577 | "body": [
578 | "${1|this,vm|}.\\$refs$2"
579 | ],
580 | "description": "Type: Object. Read only."
581 | },
582 | "vm.$isServer": {
583 | "prefix": "vmIsServer",
584 | "body": [
585 | "${1|this,vm|}.\\$isServer$2"
586 | ],
587 | "description": "Type: boolean. Read only."
588 | },
589 | "vm.$attrs": {
590 | "prefix": "vmAttrs",
591 | "body": [
592 | "${1|this,vm|}.\\$attrs$2"
593 | ],
594 | "description": "Type: { [key: string]: string }. Read only."
595 | },
596 | "vm.$listeners": {
597 | "prefix": "vmListeners",
598 | "body": [
599 | "${1|this,vm|}.\\$listeners$2"
600 | ],
601 | "description": "Type: { [key: string]: Function | Array }. Read only."
602 | },
603 | "vm.$watch": {
604 | "prefix": "vmWatch",
605 | "body": [
606 | "${1|this,vm|}.\\$watch(${2:expOrFn}, ${3:callback}${4:, [options]})"
607 | ],
608 | "description": "vm.$watch( expOrFn, callback, [options] )\n Arguments:\n {string | Function} expOrFn\n {Function | Object} callback\n {Object} [options]\n {boolean} [options.deep]\n\t {boolean} [options.immediate]"
609 | },
610 | "vm.$set": {
611 | "prefix": "vmSet",
612 | "body": [
613 | "${1|this,vm|}.\\$set(${2:target}, ${3:key}, ${4:value})"
614 | ],
615 | "description": "vm.$set( target, key, value ). This is the alias of the global Vue.set."
616 | },
617 | "vm.$delete": {
618 | "prefix": "vmDelete",
619 | "body": [
620 | "${1|this,vm|}.\\$delete(${2:target}, ${3:key}). This is the alias of the global Vue.delete."
621 | ],
622 | "description": "vm.$delete( target, key )"
623 | },
624 | "vm.$on": {
625 | "prefix": "vmOn",
626 | "body": [
627 | "${1|this,vm|}.\\$on('${2:event}', ${3:callback})$4"
628 | ],
629 | "description": "vm.$on( event, callback )"
630 | },
631 | "vm.$once": {
632 | "prefix": "vmOnce",
633 | "body": [
634 | "${1|this,vm|}.\\$once('${2:event}', ${3:callback})$4"
635 | ],
636 | "description": "vm.$once( event, callback )"
637 | },
638 | "vm.$off": {
639 | "prefix": "vmOff",
640 | "body": [
641 | "${1|this,vm|}.\\$off('${2:event}', ${3:callback})$4"
642 | ],
643 | "description": "vm.$off( [event, callback] )"
644 | },
645 | "vm.$emit": {
646 | "prefix": "vmEmit",
647 | "body": [
648 | "${1|this,vm|}.\\$emit('${2:event}'${3:, […args]})$4"
649 | ],
650 | "description": "vm.$emit( event, […args] )"
651 | },
652 | "vm.$mount": {
653 | "prefix": "vmMount",
654 | "body": [
655 | "${1|this,vm|}.\\$mount('$2')"
656 | ],
657 | "description": "vm.$mount( [elementOrSelector] )"
658 | },
659 | "vm.$forceUpdate": {
660 | "prefix": "vmForceUpdate",
661 | "body": [
662 | "${1|this,vm|}.\\$forceUpdate()"
663 | ],
664 | "description": "vm.$forceUpdate()"
665 | },
666 | "vm.$nextTick": {
667 | "prefix": "vmNextTick",
668 | "body": [
669 | "${1|this,vm|}.\\$nextTick(${2:callback})"
670 | ],
671 | "description": "vm.$nextTick( callback )"
672 | },
673 | "vm.$destroy": {
674 | "prefix": "vmDestroy",
675 | "body": [
676 | "${1|this,vm|}.\\$destroy()$2"
677 | ],
678 | "description": "vm.$destroy()"
679 | },
680 | "renderer": {
681 | "prefix": "renderer",
682 | "body": [
683 | "const ${1:renderer} = require('vue-server-renderer').createRenderer()$0"
684 | ],
685 | "description": "require('vue-server-renderer').createRenderer()"
686 | },
687 | "createRenderer": {
688 | "prefix": "createRenderer",
689 | "body": [
690 | "createRenderer({",
691 | "\t$1",
692 | "})"
693 | ],
694 | "description": "createRenderer({ })"
695 | },
696 | "renderToString": {
697 | "prefix": "renderToString",
698 | "body": [
699 | "renderToString"
700 | ],
701 | "description": "just a word"
702 | },
703 | "renderToStream": {
704 | "prefix": "renderToStream",
705 | "body": [
706 | "renderToStream"
707 | ],
708 | "description": "just a word"
709 | },
710 | "createBundleRenderer": {
711 | "prefix": "createBundleRenderer",
712 | "body": [
713 | "createBundleRenderer"
714 | ],
715 | "description": "just a word"
716 | },
717 | "bundleRenderer.renderToString": {
718 | "prefix": "bundleRendererRenderToString",
719 | "body": [
720 | "bundleRenderer.renderToString"
721 | ],
722 | "description": "just a word"
723 | },
724 | "bundleRenderer.renderToStream": {
725 | "prefix": "bundleRendererRenderToStream",
726 | "body": [
727 | "bundleRenderer.renderToStream"
728 | ],
729 | "description": "just a word"
730 | },
731 | "preventDefault": {
732 | "prefix": "preventDefault",
733 | "body": [
734 | "preventDefault();",
735 | "$1"
736 | ],
737 | "description": "preventDefault()"
738 | },
739 | "stopPropagation": {
740 | "prefix": "stopPropagation",
741 | "body": [
742 | "stopPropagation();",
743 | "$1"
744 | ],
745 | "description": "stopPropagation()"
746 | },
747 | "importVueRouter": {
748 | "prefix": "importVueRouter",
749 | "body": [
750 | "import VueRouter from 'vue-router'"
751 | ],
752 | "description": "import VueRouter from 'vue-router'"
753 | },
754 | "newVueRouter": {
755 | "prefix": "newVueRouter",
756 | "body": [
757 | "const ${1:router} = new VueRouter({",
758 | "\t$2",
759 | "})$0"
760 | ],
761 | "description": "const router = newVueRouter({ })"
762 | },
763 | "routerBeforeEach": {
764 | "prefix": "routerBeforeEach",
765 | "body": [
766 | "${1:router}.beforeEach((to, from, next) => {",
767 | "\t${2:// to and from are both route objects. must call `next`.}",
768 | "})$0"
769 | ],
770 | "description": "router.beforeEach"
771 | },
772 | "routerBeforeResolve": {
773 | "prefix": "routerBeforeResolve",
774 | "body": [
775 | "${1:router}.beforeResolve((to, from, next) => {",
776 | "\t${2:// to and from are both route objects. must call `next`.}",
777 | "})$0"
778 | ],
779 | "description": "router.beforeResolve"
780 | },
781 | "routerAfterEach": {
782 | "prefix": "routerAfterEach",
783 | "body": [
784 | "${1:router}.afterEach((to, from) => {",
785 | "\t${2:// to and from are both route objects.}",
786 | "})$0"
787 | ],
788 | "description": "router.afterEach"
789 | },
790 | "routerPush": {
791 | "prefix": "routerPush",
792 | "body": [
793 | "${1:router}.push($2)$0"
794 | ],
795 | "description": "router.push()"
796 | },
797 | "routerReplace": {
798 | "prefix": "routerReplace",
799 | "body": [
800 | "${1:router}.replace($2)$0"
801 | ],
802 | "description": "router.replace()"
803 | },
804 | "routerGo": {
805 | "prefix": "routerGo",
806 | "body": [
807 | "${1:router}.go($2)$0"
808 | ],
809 | "description": "router.go()"
810 | },
811 | "routerBack": {
812 | "prefix": "routerBack",
813 | "body": [
814 | "${1:router}.back($2)$0"
815 | ],
816 | "description": "router.back()"
817 | },
818 | "routerForward": {
819 | "prefix": "routerForward",
820 | "body": [
821 | "${1:router}.forward($2)$0"
822 | ],
823 | "description": "router.forward()"
824 | },
825 | "routerGetMatchedComponents": {
826 | "prefix": "routerGetMatchedComponents",
827 | "body": [
828 | "${1:router}.getMatchedComponents($2)$0"
829 | ],
830 | "description": "router.getMatchedComponents()"
831 | },
832 | "routerResolve": {
833 | "prefix": "routerResolve",
834 | "body": [
835 | "${1:router}.resolve($2)$0"
836 | ],
837 | "description": "router.resolve()"
838 | },
839 | "routerAddRoutes": {
840 | "prefix": "routerAddRoutes",
841 | "body": [
842 | "${1:router}.addRoutes($2)$0"
843 | ],
844 | "description": "router.addRoutes()"
845 | },
846 | "routerOnReady": {
847 | "prefix": "routerOnReady",
848 | "body": [
849 | "${1:router}.onReady($2)$0"
850 | ],
851 | "description": "router.onReady()"
852 | },
853 | "routerOnError": {
854 | "prefix": "routerOnError",
855 | "body": [
856 | "${1:router}.onError($2)$0"
857 | ],
858 | "description": "router.onError()"
859 | },
860 | "routes": {
861 | "prefix": "routes",
862 | "body": [
863 | "routes: [$1]$0"
864 | ],
865 | "description": "routes: []"
866 | },
867 | "beforeEnter": {
868 | "prefix": "beforeEnter",
869 | "body": [
870 | "beforeEnter: (to, from, next) => {",
871 | "\t${1:// ...}",
872 | "}"
873 | ],
874 | "description": "beforeEnter: (to, from, next) => { }"
875 | },
876 | "beforeRouteEnter": {
877 | "prefix": "beforeRouteEnter",
878 | "body": [
879 | "beforeRouteEnter (to, from, next) {",
880 | "\t${1:// ...}",
881 | "}"
882 | ],
883 | "description": "beforeRouteEnter (to, from, next) { }"
884 | },
885 | "beforeRouteLeave": {
886 | "prefix": "beforeRouteLeave",
887 | "body": [
888 | "beforeRouteLeave (to, from, next) {",
889 | "\t${1:// ...}",
890 | "}"
891 | ],
892 | "description": "beforeRouteLeave (to, from, next) { }"
893 | },
894 | "scrollBehavior": {
895 | "prefix": "scrollBehavior",
896 | "body": [
897 | "scrollBehavior (to, from, savedPosition) {",
898 | "\t${1:// ...}",
899 | "}"
900 | ],
901 | "description": "scrollBehavior (to, from, savedPosition) { }"
902 | },
903 | "path": {
904 | "prefix": "path",
905 | "body": [
906 | "path"
907 | ],
908 | "description": "just a word"
909 | },
910 | "alias": {
911 | "prefix": "alias",
912 | "body": [
913 | "alias"
914 | ],
915 | "description": "just a word"
916 | },
917 | "mode": {
918 | "prefix": "mode",
919 | "body": [
920 | "mode"
921 | ],
922 | "description": "just a word"
923 | },
924 | "children": {
925 | "prefix": "children",
926 | "body": [
927 | "children"
928 | ],
929 | "description": "just a word"
930 | },
931 | "meta": {
932 | "prefix": "meta",
933 | "body": [
934 | "meta"
935 | ],
936 | "description": "just a word"
937 | },
938 | "newVuexStore": {
939 | "prefix": "newVuexStore",
940 | "body": [
941 | "const ${1:store} = new Vuex.Store({",
942 | "\t${2:// ...}",
943 | "})"
944 | ],
945 | "description": "const store = new Vuex.Store({ })"
946 | },
947 | "state": {
948 | "prefix": "state",
949 | "body": [
950 | "state"
951 | ],
952 | "description": "just a word"
953 | },
954 | "getters": {
955 | "prefix": "getters",
956 | "body": [
957 | "getters"
958 | ],
959 | "description": "just a word"
960 | },
961 | "mutations": {
962 | "prefix": "mutations",
963 | "body": [
964 | "mutations"
965 | ],
966 | "description": "just a word"
967 | },
968 | "actions": {
969 | "prefix": "actions",
970 | "body": [
971 | "actions"
972 | ],
973 | "description": "just a word"
974 | },
975 | "modules": {
976 | "prefix": "modules",
977 | "body": [
978 | "modules"
979 | ],
980 | "description": "just a word"
981 | },
982 | "plugins": {
983 | "prefix": "plugins",
984 | "body": [
985 | "plugins"
986 | ],
987 | "description": "just a word"
988 | },
989 | "commit": {
990 | "prefix": "commit",
991 | "body": [
992 | "commit"
993 | ],
994 | "description": "just a word"
995 | },
996 | "dispatch": {
997 | "prefix": "dispatch",
998 | "body": [
999 | "dispatch"
1000 | ],
1001 | "description": "just a word"
1002 | },
1003 | "replaceState": {
1004 | "prefix": "replaceState",
1005 | "body": [
1006 | "replaceState"
1007 | ],
1008 | "description": "just a word"
1009 | },
1010 | "subscribe": {
1011 | "prefix": "subscribe",
1012 | "body": [
1013 | "subscribe"
1014 | ],
1015 | "description": "just a word"
1016 | },
1017 | "registerModule": {
1018 | "prefix": "registerModule",
1019 | "body": [
1020 | "registerModule"
1021 | ],
1022 | "description": "just a word"
1023 | },
1024 | "unregisterModule": {
1025 | "prefix": "unregisterModule",
1026 | "body": [
1027 | "unregisterModule"
1028 | ],
1029 | "description": "just a word"
1030 | },
1031 | "hotUpdate": {
1032 | "prefix": "hotUpdate",
1033 | "body": [
1034 | "hotUpdate"
1035 | ],
1036 | "description": "just a word"
1037 | },
1038 | "mapState": {
1039 | "prefix": "mapState",
1040 | "body": [
1041 | "mapState"
1042 | ],
1043 | "description": "just a word"
1044 | },
1045 | "mapGetters": {
1046 | "prefix": "mapGetters",
1047 | "body": [
1048 | "mapGetters"
1049 | ],
1050 | "description": "just a word"
1051 | },
1052 | "mapActions": {
1053 | "prefix": "mapActions",
1054 | "body": [
1055 | "mapActions"
1056 | ],
1057 | "description": "just a word"
1058 | },
1059 | "mapMutations": {
1060 | "prefix": "mapMutations",
1061 | "body": [
1062 | "mapMutations"
1063 | ],
1064 | "description": "just a word"
1065 | },
1066 | "asyncData": {
1067 | "prefix": "asyncData",
1068 | "body": [
1069 | "asyncData({${1:isDev}${2:, route}${3:, store}${4:, env}${5:, params}${6:, query}${7:, req}${8:, res}${9:, redirect}${10:, error}}) {",
1070 | "\t$11",
1071 | "},"
1072 | ],
1073 | "description": "Type: Function."
1074 | }
1075 | }
--------------------------------------------------------------------------------
/snippets/pug.json:
--------------------------------------------------------------------------------
1 | {
2 | "v-text": {
3 | "prefix": "vText",
4 | "body": [
5 | "v-text='${1:msg}'"
6 | ],
7 | "description": "Expects: string"
8 | },
9 | "v-html": {
10 | "prefix": "vHtml",
11 | "body": [
12 | "v-html='${1:html}'"
13 | ],
14 | "description": "Expects: string"
15 | },
16 | "v-show": {
17 | "prefix": "vShow",
18 | "body": [
19 | "v-show='${1:condition}'"
20 | ],
21 | "description": "Expects: any"
22 | },
23 | "v-if": {
24 | "prefix": "vIf",
25 | "body": [
26 | "v-if='${1:condition}'"
27 | ],
28 | "description": "Expects: any"
29 | },
30 | "v-else": {
31 | "prefix": "vElse",
32 | "body": [
33 | "v-else"
34 | ],
35 | "description": "Does not expect expression. previous sibling element must have v-if or v-else-if."
36 | },
37 | "v-else-if": {
38 | "prefix": "vElseIf",
39 | "body": [
40 | "v-else-if='${1:condition}'"
41 | ],
42 | "description": "Expects: any. previous sibling element must have v-if or v-else-if."
43 | },
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 | },
51 | "v-for": {
52 | "prefix": "vFor",
53 | "body": [
54 | "v-for='${1:item} in ${2:items}' :key='${3:item.id}'"
55 | ],
56 | "description": "Expects: Array | Object | number | string"
57 | },
58 | "v-on": {
59 | "prefix": "vOn",
60 | "body": [
61 | "v-on:${1:event}='${2:handle}'"
62 | ],
63 | "description": "Expects: Function | Inline Statement"
64 | },
65 | "v-bind": {
66 | "prefix": "vBind",
67 | "body": [
68 | "v-bind$1='${2}'"
69 | ],
70 | "description": "Expects: any (with argument) | Object (without argument)"
71 | },
72 | "v-model": {
73 | "prefix": "vModel",
74 | "body": [
75 | "v-model='${1:something}'"
76 | ],
77 | "description": "Expects: varies based on value of form inputs element or output of components"
78 | },
79 | "v-pre": {
80 | "prefix": "vPre",
81 | "body": [
82 | "v-pre"
83 | ],
84 | "description": "Does not expect expression"
85 | },
86 | "v-cloak": {
87 | "prefix": "vCloak",
88 | "body": [
89 | "v-cloak"
90 | ],
91 | "description": "Does not expect expression"
92 | },
93 | "v-once": {
94 | "prefix": "vOnce",
95 | "body": [
96 | "v-once"
97 | ],
98 | "description": "Does not expect expression"
99 | },
100 | "key": {
101 | "prefix": "key",
102 | "body": [
103 | ":key='${1:key}'"
104 | ],
105 | "description": "Expects: string. Children of the same common parent must have unique keys. Duplicate keys will cause render errors."
106 | },
107 | "ref": {
108 | "prefix": "ref",
109 | "body": [
110 | "ref='${1:reference}'$0"
111 | ],
112 | "description": "Expects: string. ref is used to register a reference to an element or a child component. The reference will be registered under the parent component’s $refs object. If used on a plain DOM element, the reference will be that element; if used on a child component, the reference will be component instance."
113 | },
114 | "slotA": {
115 | "prefix": "slotA",
116 | "body": [
117 | "slot='$1'$0"
118 | ],
119 | "description": "slot=''. Expects: string. Used on content inserted into child components to indicate which named slot the content belongs to."
120 | },
121 | "slotE": {
122 | "prefix": "slotE",
123 | "body": [
124 | "slot"
125 | ],
126 | "description": ". Expects: string. Used on content inserted into child components to indicate which named slot the content belongs to."
127 | },
128 | "slotScope": {
129 | "prefix": "slotScope",
130 | "body": [
131 | "slot-scope='$1'$0"
132 | ],
133 | "description": "Used to denote an element or component as a scoped slot. The attribute’s value should be a valid JavaScript expression that can appear in the argument position of a function signature. This means in supported environments you can also use ES2015 destructuring in the expression. Serves as a replacement for scope in 2.5.0+."
134 | },
135 | "scope": {
136 | "prefix": "scope",
137 | "body": [
138 | "scope='${1:this api replaced by slot-scope in 2.5.0+}'$0"
139 | ],
140 | "description": "Used to denote a element as a scoped slot, which is replaced by `slot-scope` in 2.5.0+."
141 | },
142 | "component": {
143 | "prefix": "component",
144 | "body": [
145 | "component(:is='${1:componentId}') $0"
146 | ],
147 | "description": "component element"
148 | },
149 | "keep-alive": {
150 | "prefix": "keepAlive",
151 | "body": [
152 | "keep-alive$0"
153 | ],
154 | "description": "keep-alive element"
155 | },
156 | "transition": {
157 | "prefix": "transition",
158 | "body": [
159 | "transition$0"
160 | ],
161 | "description": "transition element"
162 | },
163 | "transition-group": {
164 | "prefix": "transitionGroup",
165 | "body": [
166 | "transition-group$0"
167 | ],
168 | "description": "transition-group element"
169 | },
170 | "enter-class": {
171 | "prefix": "enterClass",
172 | "body": [
173 | "enter-class='$1'$0"
174 | ],
175 | "description": "enter-class=''. Expects: string."
176 | },
177 | "leave-class": {
178 | "prefix": "leaveClass",
179 | "body": [
180 | "leave-class='$1'$0"
181 | ],
182 | "description": "leave-class=''. Expects: string."
183 | },
184 | "appear-class": {
185 | "prefix": "appearClass",
186 | "body": [
187 | "appear-class='$1'$0"
188 | ],
189 | "description": "appear-class=''. Expects: string."
190 | },
191 | "enter-to-class": {
192 | "prefix": "enterToClass",
193 | "body": [
194 | "enter-to-class='$1'$0"
195 | ],
196 | "description": "enter-to-class=''. Expects: string."
197 | },
198 | "leave-to-class": {
199 | "prefix": "leaveToClass",
200 | "body": [
201 | "leave-to-class='$1'$0"
202 | ],
203 | "description": "leave-to-class=''. Expects: string."
204 | },
205 | "appear-to-class": {
206 | "prefix": "appearToClass",
207 | "body": [
208 | "appear-to-class='$1'$0"
209 | ],
210 | "description": "appear-to-class=''. Expects: string."
211 | },
212 | "enter-active-class": {
213 | "prefix": "enterActiveClass",
214 | "body": [
215 | "enter-active-class='$1'$0"
216 | ],
217 | "description": "enter-active-class=''. Expects: string."
218 | },
219 | "leave-active-class": {
220 | "prefix": "leaveActiveClass",
221 | "body": [
222 | "leave-active-class='$1'$0"
223 | ],
224 | "description": "leave-active-class=''. Expects: string."
225 | },
226 | "appear-active-class": {
227 | "prefix": "appearActiveClass",
228 | "body": [
229 | "appear-active-class='$1'$0"
230 | ],
231 | "description": "appear-active-class=''. Expects: string."
232 | },
233 | "before-enter": {
234 | "prefix": "beforeEnterEvent",
235 | "body": [
236 | "@before-enter='$1'$0"
237 | ],
238 | "description": "@before-enter=''"
239 | },
240 | "before-leave": {
241 | "prefix": "beforeLeaveEvent",
242 | "body": [
243 | "@before-leave='$1'$0"
244 | ],
245 | "description": "@before-leave=''"
246 | },
247 | "before-appear": {
248 | "prefix": "beforeAppearEvent",
249 | "body": [
250 | "@before-appear='$1'$0"
251 | ],
252 | "description": "@before-appear=''"
253 | },
254 | "enter": {
255 | "prefix": "enterEvent",
256 | "body": [
257 | "@enter='$1'$0"
258 | ],
259 | "description": "@enter=''"
260 | },
261 | "leave": {
262 | "prefix": "leaveEvent",
263 | "body": [
264 | "@leave='$1'$0"
265 | ],
266 | "description": "@leave=''"
267 | },
268 | "appear": {
269 | "prefix": "appearEvent",
270 | "body": [
271 | "@appear='$1'$0"
272 | ],
273 | "description": "@appear=''"
274 | },
275 | "after-enter": {
276 | "prefix": "afterEnterEvent",
277 | "body": [
278 | "@after-enter='$1'$0"
279 | ],
280 | "description": "@after-enter=''"
281 | },
282 | "after-leave": {
283 | "prefix": "afterLeaveEvent",
284 | "body": [
285 | "@after-leave='$1'$0"
286 | ],
287 | "description": "@after-leave=''"
288 | },
289 | "after-appear": {
290 | "prefix": "afterAppearEvent",
291 | "body": [
292 | "@after-appear='$1'$0"
293 | ],
294 | "description": "@after-appear=''"
295 | },
296 | "enter-cancelled": {
297 | "prefix": "enterCancelledEvent",
298 | "body": [
299 | "@enter-cancelled='$1'$0"
300 | ],
301 | "description": "@enter-cancelled=''"
302 | },
303 | "leave-cancelled": {
304 | "prefix": "leaveCancelledEvent",
305 | "body": [
306 | "@leave-cancelled='$1'$0"
307 | ],
308 | "description": "@leave-cancelled='' (v-show only)"
309 | },
310 | "appear-cancelled": {
311 | "prefix": "appearCancelledEvent",
312 | "body": [
313 | "@appear-cancelled='$1'$0"
314 | ],
315 | "description": "@appear-cancelled=''"
316 | },
317 | "routerLink": {
318 | "prefix": "routerLink",
319 | "body": [
320 | "router-link $0"
321 | ],
322 | "description": "router-link element"
323 | },
324 | "routerLinkTo": {
325 | "prefix": "routerLinkTo",
326 | "body": [
327 | "router-link(to='$1') $0"
328 | ],
329 | "description": "router-link(to='') . router-link element"
330 | },
331 | "to": {
332 | "prefix": "to",
333 | "body": [
334 | "to='$1'$0"
335 | ],
336 | "description": "to=''"
337 | },
338 | "tag": {
339 | "prefix": "tag",
340 | "body": [
341 | "tag='$1'$0"
342 | ],
343 | "description": "tag=''"
344 | },
345 | "routerView": {
346 | "prefix": "routerView",
347 | "body": [
348 | "router-view $0"
349 | ],
350 | "description": "router-view element"
351 | }
352 | }
353 |
--------------------------------------------------------------------------------
/snippets/vue.json:
--------------------------------------------------------------------------------
1 | {
2 | "templateLang": {
3 | "prefix": "templateLang",
4 | "body": [
5 | "",
6 | "\t",
7 | "\t\t$0",
8 | "\t
",
9 | ""
10 | ],
11 | "description": "template element"
12 | },
13 | "script": {
14 | "prefix": "script",
15 | "body": [
16 | ""
21 | ],
22 | "description": "script element"
23 | },
24 | "styleLang": {
25 | "prefix": "styleLang",
26 | "body": [
27 | ""
30 | ],
31 | "description": "style element with lang attribute"
32 | }
33 | }
--------------------------------------------------------------------------------