这个地方是写描述的地方
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
| require 'ruble'
with_defaults :scope => 'text.html text' do |bundle|
snippet 'div_class' do |cmd| cmd.trigger = 'divc' cmd.expansion = "<div class=\"$1\">$0</div>" cmd.needApplyReContentAssist = true end
snippet 'ng-pluralize' do |cmd| cmd.trigger = 'ngp' cmd.expansion = "<ng-pluralize>$1</ng-pluralize>" end
end
with_defaults :scope => 'text.html entity.other.attribute-name.html' do |bundle|
snippet 'ng-' do |s| s.trigger = 'ng-' s.expansion='ng-${1:app/bind/bind-html/bind-template/blur/change/checked/class/class-even/class-odd/click/cloak/controller/copy/csp/cut/dblclick/disabled/focus/hide/href/if/include/init/keydown/keypress/keyup/list/model/mousedown/mouseenter/mouseleave/mousemove/mouseover/mouseup/ng-non-bindable/open/options/paste/readonly/repeat-start/repeat-end/selected/show/src/srcset/style/submit/swipe-left/swipe-right/switch/switch-default/switch-when/view}="$2"' s.locationType='HTML_ATTRIBUTE' end
snippet 'ms-' do |s| s.trigger = 'ms-' s.expansion='ms-${1:skip/controller/important/attr/css/text/html/class/active/hover/if/visible/for/on/on-animationend/on-blur/on-change/on-input/on-click/on-dblclick/on-focus/on-keydown/on-keypress/on-keyup/on-mousedown/on-mouseenter/on-mouseleave/on-mousemove/on-mouseout/on-mouseover/on-mouseup/on-scroll/on-submit/duplex/rules/validate/effect/widget}="$2"' s.locationType='HTML_ATTRIBUTE' end
snippet ':' do |s| s.trigger = ':' s.expansion=':${1:skip/controller/important/attr/css/text/html/class/active/hover/if/visible/for/on/on-animationend/on-blur/on-change/on-input/on-click/on-dblclick/on-focus/on-keydown/on-keypress/on-keyup/on-mousedown/on-mouseenter/on-mouseleave/on-mousemove/on-mouseout/on-mouseover/on-mouseup/on-scroll/on-submit/duplex/rules/validate/effect/widget}="$2"' s.locationType='HTML_ATTRIBUTE' end
snippet 'v-' do |s| s.trigger = 'v-' s.expansion='v-${1:text/html/show/if/else/else-if/for/on/bind/model/pre/cloak/once}="$2"' s.locationType='HTML_ATTRIBUTE' end
end
with_defaults :scope => 'text.html - source', :input => :none, :output => :insert_as_snippet do |bundle|
end
|
參考資料
个人微信公众号 | 技术交流QQ群 |
|
|