Skip to content

mauroreisvieira/sublime-vue-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue Sublime Snippets

Introduction

Vue is a progressive javascript framework for building user interfaces. This repository was built to help developers in their day-to-day development of components in Vue also these snippets were developed only for version 2 of Vue framework.

Installation

With Package Control: (NOT AVAILABLE YET)

  1. Open Package Control - (Ctrl or ⌘) + ⇧ + P
  2. Type Vue Snippets and press Enter
  3. Ready to use 🎉

Manually:

  1. Download latest release and unzip. it into your Packages folder
  2. Go to Sublime Text → Preferences → Browse Packages
  3. Move folder to inside, start using...

Snippets

Vue

Snippet Purpose
vbase Single file component base

Template

Snippet Purpose
vclass Class binding
vfor v-for directive
vif v-if directive
vmodel Semantic v-model directive
von v-on click handler with arguments
vshow v-show directive
vsrc Image src binding
vstyle Inline style binding

Script

Snippet Purpose
vcomputed Vue computed property
vdata Component data as a function
vdestroyed Vue destroyed
vdirectives Vue create a custom directive
vfilter Vue filter
vimport Import one component into another
vmethods Vue methods
vmixin Create a Vue Mixin
vmounted Vue mounted
vprops Props with type and default
vwatch Vue watcher with new and old value args
vdispatch Dispatch to Vuex store in methods for action
vinc incrementer
vdec decrementer

Vuex

Snippet Purpose
vactions Vuex Actions
vgetters Vuex Getter
vmutations Vuex Mutations

Thanks

Special thank you to Sarah Drasner, for creating the following repository vue-vscode-snippet.

License

Sublime Vue Snippets is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

Created with ♥️ by @mauroreisvieira in Portugal