Browse Source

Updates to ease rails development...

- (euby) let image_tag take an object as the path
  - (html) define many elements to alias attrTag
  - (ruby) modify :key => val snippet
master
jimi 14 years ago
parent
commit
0b4a310fed
  1. 3
      ftplugin/eruby/eruby.xpt.vim
  2. 35
      ftplugin/html/html.xpt.vim
  3. 4
      ftplugin/ruby/ruby.xpt.vim

3
ftplugin/eruby/eruby.xpt.vim

@ -49,8 +49,7 @@ XSET cursor=Echo('')
`:end:^ `:end:^
XPT it hidden " embed-able image tag XPT it hidden " embed-able image tag
XSET image_path=$img_path/
image_tag('`image_path^`image_file^'`, `opt?^)
image_tag(`image_path^`, `opt?^)
XPT image_tag synonym=imt " <%= image_tag... XPT image_tag synonym=imt " <%= image_tag...
<%= `:it:^ %> <%= `:it:^ %>

35
ftplugin/html/html.xpt.vim

@ -90,8 +90,10 @@ XPT jscript synonym=js
`cursor^ `cursor^
</script> </script>
XPT div wrap=content synonym=span " <$_xSnipName att?>..</$_xSnipName>
XPT tagAttr wrap=content hidden " <$_xSnipName att?>..</$_xSnipName>
XSET content|ontype=html_cont_ontype() XSET content|ontype=html_cont_ontype()
XSET att?=Echo('')
XSET att?|post=Echo(V()=~'\V\^ \$\|att?' ? '' : V())
<`$_xSnipName^` `att?^>`content^^`content^html_cont_helper()^</`$_xSnipName^> <`$_xSnipName^` `att?^>`content^^`content^html_cont_helper()^</`$_xSnipName^>
XPT di wrap=cursor " <div id..>\n\n</div>\n<!-- id.. XPT di wrap=cursor " <div id..>\n\n</div>\n<!-- id..
@ -102,14 +104,25 @@ XSET val|post=Echo(V()=~'\V\^ id=""\$\|val' ? '' : V())
</div> </div>
<!--`val^ --> <!--`val^ -->
XPT blockTag wrap=content hidden " <$_xSnipName >\n .. \n</$_xSnipName>
<`$_xSnipName^` `att?^>
`content^^
</`$_xSnipName^>
XPT span alias=tagAttr
XPT ul abbr alias=blockTag
XPT div alias=tagAttr
XPT ol abbr alias=blockTag
XPT tr abbr alias=tagAttr
XPT td abbr alias=tagAttr
XPT ul abbr alias=tagAttr
XPT ol abbr alias=tagAttr
XPT dl abbr alias=tagAttr
XPT dt abbr alias=tagAttr
XPT dd abbr alias=tagAttr
XPT br abbr alias=_shorttag
XPT li abbr " <li>..</li>... XPT li abbr " <li>..</li>...
XSET content=Echo('') XSET content=Echo('')
@ -149,13 +162,13 @@ XSET content=Echo('')
" HTML5 Snippets " HTML5 Snippets
" "
XPT header alias=blockTag
XPT header alias=tagAttr
XPT section alias=blockTag
XPT section alias=tagAttr
XPT aside alias=blockTag
XPT aside alias=tagAttr
XPT footer alias=blockTag
XPT footer alias=tagAttr
XPT nav " <nav class="... XPT nav " <nav class="...
<nav` `att?^> <nav` `att?^>

4
ftplugin/ruby/ruby.xpt.vim

@ -22,6 +22,10 @@ XSET bool=true`^
" eRuby attribute snippets " eRuby attribute snippets
XPT : " :key => val
XSET val=Echo('')
:`key^ => `val^
XPT key hidden " $_xSnipName => val XPT key hidden " $_xSnipName => val
XSET val=Echo('') XSET val=Echo('')
`$_xSnipName^ => `val^ `$_xSnipName^ => `val^