Vue 2 Snippets installs statistics
By XiangHongAi · VS Code Marketplace · Snippets
Code snippets for Vue 2 (Only Vue 2.x, Vue Router 3.x, @vue/composition-api)
Vue 2 Snippets has 278,820 recorded installs on VS Code Marketplace.
It ranks #1208 of 2,500 tracked VS Code Marketplace listings by installs.
It is rated 4.3 out of 5 from 18 ratings.
PluginStats has 3 daily observations since Oct 16, 2026; the latest is from Oct 18, 2026.
Rating: 4.33 / 5 from 18 ratings
About Vue 2 Snippets
Vue 2 Snippet (Visual Studio Code)
⚡ Code snippets for Vue (Only Vue 2.x, Vue Router 3.x, @vue/composition-api).
Extension's page on Visual Studio Marketplace, 📖 reading feels better.
This extension is not recommended for Vue 3.x, Please create Profiles in VS Code and install the Vue 3.x technology stack extension, such as Vue 3 Snippets.
本扩展不推荐用于 Vue 3.x 版本,请在 VS Code 创建 Profiles 安装 Vue 3.x 技术栈扩展,如:Vue 3 Snippets。
Introduction 📚
"YES, YES, VERY SMOOTH, SUPER SMOOTH".
There is no need to deliberately memorize it, you can generate code according to the Vue API partial abbreviations, and special handling required to reduce conflicts. You only need to understand the Extension design rules of this extension to release your energy.
--
来自一线、为了顺手调了又调的扩展 😎。
理解本扩展的设计之后 (Vue API 部分缩写,以及减少冲突需要特别的处理方式),无需刻意去死记硬背,几乎没有记忆成本,释放你的小宇宙! ヾ(´︶`*)ノ♬
Design 🖖
Forget the framework, Focus on the business.
--
框架,框架,有别于灵活的语言,框架就是限定了各种条条框框,让开发者在限/约定的 API 中做事情;因此,开发者在编码过程中,在框架层面输入的字符要少之有少,应当通过代码片段或 AIGC 快速创建框架相关的代码结构,将更多的精力聚焦在业务逻辑代码上;本扩展就是用于辅助生成框架侧的代码 (不用关注 Vue 框架语法,仅关注业务逻辑)。
本扩展提供了 Vue 2 技术栈的代码片段,包括 Options API 、Composition API 和 Vue Router 3.x,支持 @vue/composition-api 及 unplugin-vue2-script-setup 机制下的语法。
例如,监听一个值:
To get the above code, you only need to understand it as: watch property deep immediate, and then enter wpdi through VS Code's Suggest Match and press Enter.
想得到上面这一段代码,只需要理解为:watch property deep immediate, 然后通过 VS Code 自带的联想功能,输入 wpdi 回车即可。
再例如,声明一个 Props 属性:
Same as above...
想得到上面这一段代码,只需要理解为:props Object default required, 然后通过 VS Code 自带的联想功能,输入 psOdr 回车即可 (注意大小写,减少冲突),或者通过本扩展内置的 podr 缩写前缀直接生成。
仅高频常用代码提供缩写前缀。
又例如,我们在创建 .vue 文件后,要书写基本的 SFC 元素,本扩展提供许多便捷的代码片断,具体参考 _〖Single-File Components / 单文件组件〗_ 章节内容。
Snippets 🚀
• Single-File Components / 单文件组件 • Vue Language Blocks / SFC 语法定义 • Options API • Props Property • Watch Property (Options API) • Watch (Composition API) • Computed • Lifecycle Hooks (Options API) • Lifecycle Hooks (Composition API) • Instance Properties & Methods • Built-ins Directives • Built-ins Components • Vue Router v3.x
Recommended editor settings (建议配置编辑器):
Single-File Components / 单文件组件
The sfc prefix generates Vue Single-File Components, Some examples:
--
通过 sfc 前缀触发,包含大量创建 Vue 单文件组件的代码片段,部分示例如下:
Vue 2.6 及以下版本,推荐 unplugin-vue2-script-setup;
Vue 2.7 已内置 Composition API;
因此,整个 Vue2 系列,语法形式上,将有五大类🤣。
1. Vue2 SFC-Options API 2. Vue2 SFC-Composition API (2.7+) 3. Vue2 SFC-Composition API (2.7+) 4. Vue2 SFC-Composition API Plugin (依赖 @vue/composition-api) 5. Vue2 SFC-Composition API Plugin (依赖 @vue/composition-api & unplugin-vue2-script-setup)
| Full prefix screenshot (SFC) / 完整前缀截图 (单文件组件) |
| | | ... |
Vue Language Blocks / SFC 语法定义
The vue-script prefix generates language block, which contains a variety of API style scripting language blocks.
The vue-style prefix generates a language block, which contains different style preprocessing language blocks.
--
vue-script 前缀生成 语言块,包含不同风格脚本语言块;
vue-style 前缀生成 语言块,包含不同样式预处理语言块。
| Prefix | VS Code Suggest Match | Snippet |
| vue-template | t | <template>
</template> | | vue-script-setup | vss | <script setup>
</script> | | vue-style | | <style lang="" scoped>
</style> | | vue-style-module | | <style lang="scss" module>
</style> | | vue-style-scss | | <style lang="scss" scoped>
</style> | | ... | | |
vue-script-setup 需要 Vue 2.7 + vue-loader 15.10+ / vite-plugin-vue2 2.2+,或 Vue 2.6 及以下配合 unplugin-vue2-script-setup; vue-style-module 生成的 CSS Modules 块可通过 this.$style 或 useCssModule() 读取。
| Full prefix screenshot (Language Blocks) / 完整前缀截图 (SFC 语法定义) |
| |
Options API
The option- prefix generates Vue Options API Code, Examples:
--
通过 option- 前缀触发,包涵所有生成 Vue 选项式 API 的代码片段,示例如下:
| Prefix | VS Code Suggest Match | Snippet |
| option-name | | name: 'FileName', | | option-components | ocs | components: { Feature }, | | option-directives | ods | directives: {
}, | | option-props | ops | props: {
}, | | option-provide() | ope | provide() { return { property: 'value', }; }, | | option-inject | oit | inject: ['property'], | | option-data() | od | data() { return { property: 'value', }; }, | | option-computed | oc | computed: { property() { return this.property; }, }, | | computed-property | cp | property() { return this.property; }, | | computed-property-get-set | | property: { get() { return this.value; }, set(value) { this.value = value; }, }, | | option-watch | ow | watch: {
}, | | option-methods | om | methods: { methodProperty() {
}, }, | | option-setup() | os | setup(props, { emit }) {
return {
}; }, | | methods-property | mp | methodProperty() {
}, | | option-emits | | emits: \['eventName'\], | | option-expose (Vue 3 only) | | expose: \['publicMethod'\], | | option-render | | render(h, context) { return h('tag', []); }, | | ... | | |
Full prefix screenshot (Options) / 完整前缀截图:
Props Property
Just ps*...
1. 直接生成 (Prefix):ps = Props, String. 2. 联想匹配 (Suggest Match):pssdr = Props, String, default, required.
不同类型以此类推:
• String, • Number, • Boolean, • Array, • Object, • Date, • Function, • Symbol, • Promise。
| Prefix | VS Code Suggest Match | Snippet |
| props-String
ps | pss | property: String, | | props-String-default
psd | pssd | property: { type: String, default: undefined, }, | | props-String-required
psr | pssr | property: { type: String, required: true, }, | | props-String-default-required
psdr | pssdr | property: { type: String, default: undefined, required: true, }, | | ... | | |
The prefix screenshot (Props) / 前缀截图:
Watch Property (Options API)
1. 直接生成 (Prefix):wp = watch-property。 2. 联想匹配 (Suggest Match):wpdi = watch-property-deep-immediate。
| Prefix | VS Code Suggest Match | Snippet |
| watch-property | wp | property (newValue, oldValue) {
}, | | watch-property-deep | wpd | property: { deep: true, handler(newValue, oldValue) {
}, }, | | watch-property-immediate | wpi | property: { immediate: true, handler(newValue, oldValue) {…
Description from the VS Code Marketplace listing.
- Snippet
- Vue
- Vue 2
- Vue 2 Code Snippets
- Vue 2 Snippet
- Vue 2 Snippets
- Vue Router
- Vue Snippet
- Vue Snippets
- Vue2
- Vue2 Code Snippets
- Vue2 Snippet
- Vue2 Snippets
- Vuex
Where Vue 2 Snippets sits in the listing
Each band is one page of 20. Installs on a log scale. Placement is projected from installs, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Recent observations
Full history (3)Similar VS Code Marketplace Snippets plugins
Data source
Install counts, average rating, and rating counts come from the public Visual Studio Marketplace gallery API. Installs are cumulative and exclude updates.
Listing: https://marketplace.visualstudio.com/items?itemName=NicholasHsiang.vscode-vue2-snippets. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.