Browse Source

html jquery updates (googleapi), more rspec snippets

master
jimi 14 years ago
parent
commit
5d88d0721e
  1. 5
      ftplugin/html/html.xpt.vim
  2. 35
      ftplugin/ruby/ruby.xpt.vim

5
ftplugin/html/html.xpt.vim

@ -6,7 +6,7 @@ let s:f = g:XPTfuncs()
XPTvar $js_dir 'javascripts' XPTvar $js_dir 'javascripts'
XPTvar $css_dir 'stylesheets' XPTvar $css_dir 'stylesheets'
XPTvar $jq_ver '1.4.2.min'
XPTvar $jq_ver '1.4.2'
XPTvar $empty '' XPTvar $empty ''
XPT copy_comment hidden XPT copy_comment hidden
@ -75,9 +75,8 @@ XSET src=print.css
XSET media=print XSET media=print
XPT jquery abbr synonym=jq " <script... src="jquery... XPT jquery abbr synonym=jq " <script... src="jquery...
XSET dir=$js_dir/
XSET ver=$jq_ver XSET ver=$jq_ver
<script type="text/javascript" src="`dir^jquery`-`ver^.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/`ver^/jquery.min.js"></script>
XPT script " <script... src="... XPT script " <script... src="...
XSET dir=$js_dir/ XSET dir=$js_dir/

35
ftplugin/ruby/ruby.xpt.vim

@ -49,22 +49,42 @@ XSET val='`screen^'
XPT image_tag synonym=imt " image_tag... XPT image_tag synonym=imt " image_tag...
image_tag('`filename^'`, `opt?^) image_tag('`filename^'`, `opt?^)
" RSpec snippets
XPT loop " $_xSnipName args? do .. end
XPT loop wrap=content synonym=lambda " $_xSnipName args? do .. end
XSET content=Echo('') XSET content=Echo('')
`$_xSnipName^` `args^ do `$_xSnipName^` `args^ do
` `content^ ` `content^
end end
XPT doe abbr " do .. end
do
`cursor^
end
XPT pid " params[:id]
params[:id]
" Rails 3 Stuff
XPT match " match '/path', :to => ...
XSET path=Echo('')
match '`path^', :to => '`controller#method^'
XPT flash " flash[:class]...
flash[:`error^] = "`message^"
XPT fln abbr " flash.now[:class]...
flash.now[:`error^] = "`message^"
" RSpec snippets
XPT describe synonym=it alias=loop XPT describe synonym=it alias=loop
XSET args="`^" XSET args="`^"
XPT resp
XPT resp abbr
response. response.
XPT :content " $_xSnipName => "val"
`:key:^
XPT :content synonym=:cnt " :content => "val"
:content => `^
XPT shd abbr " should ... XPT shd abbr " should ...
should `^ should `^
@ -77,3 +97,6 @@ should be_
XPT shnb abbr " should_not be_ XPT shnb abbr " should_not be_
should_not be_ should_not be_
XPT hvs abbr
have_selector(`^)