diff --git a/ftplugin/eruby/eruby.xpt.vim b/ftplugin/eruby/eruby.xpt.vim index 8ccc647..8af27d2 100644 --- a/ftplugin/eruby/eruby.xpt.vim +++ b/ftplugin/eruby/eruby.xpt.vim @@ -98,3 +98,6 @@ XPT stylesheet_link_tag synonym=slt " <%= stylesheet_link_tag... XPT javascript_include_tag synonym=jit " <%= javascript_include_tag... <%= javascript_include_tag `^ %> + +XPT csrf_meta " <%= scrf_meta_tag %> +<%= csrf_meta_tag %> diff --git a/ftplugin/html/html.xpt.vim b/ftplugin/html/html.xpt.vim index 7809170..d045669 100644 --- a/ftplugin/html/html.xpt.vim +++ b/ftplugin/html/html.xpt.vim @@ -35,7 +35,7 @@ XPT doctype " -XPT content5 " XPT skel abbr synonym=html|xhtml " xhtml skeleton @@ -43,7 +43,7 @@ XPT skel abbr synonym=html|xhtml " xhtml skeleton `:title:^ - `:content5:^` + `:charset:^` `author^ @@ -122,3 +122,7 @@ XSET nav=$_xSnipName `...^ +XPT a wrap=content " `content^ diff --git a/ftplugin/ruby/ruby.xpt.vim b/ftplugin/ruby/ruby.xpt.vim index 8c764c7..a8eacaa 100644 --- a/ftplugin/ruby/ruby.xpt.vim +++ b/ftplugin/ruby/ruby.xpt.vim @@ -2,23 +2,50 @@ " XPTemplate priority=personal+ -XPT key hidden " :key => val +XPT def " def .. end +XSET action=Echo(' ') +def `method^` + `action^ +end + +" eRuby attribute snippets + +XPT key hidden " $_xSnipName => val XSET val=Echo('') `$_xSnipName^ => `val^ -XPT :cols synonym=:rows|:size|:maxsize|:null|:url +XPT :cols synonym=:rows|:size|:maxsize|:null|:url " $_xSnipName => val `:key:^ -XPT :object synonym=:collection|:locals|:layout|:method +XPT :object synonym=:collection|:locals|:layout|:method " $_xSnipName => val `:key:^ -XPT :id synonym=:class|:alt|:title|:action|:controller +XPT :id synonym=:class|:alt|:title|:action|:controller " $_xSnipName => 'val' XSET str='`val^' `:key({ 'val' : 'str' }):^ -XPT :selected synonym=:multipart +XPT :selected synonym=:multipart " $_xSnipName => true XSET bool=true`^ `:key({ 'val' : 'bool' }):^ XPT :html alias=key XSET val={ `html^ } + +" RSpec snippets + +XPT loop " loop do .. end +`loop^` `arg^ do + `cursor^ +end + +XPT describe " describe .. do +XSET name=describe +`:loop({ 'loop' : 'name' }):^ + +XPT it " it .. do +XSET name=it +`:loop({ 'loop' : 'name' }):^ + +XPT :content " $_xSnipName => "val" +XSET val="`str^" +`:key:^