Browse Source

more useabilty tweaks

master
jimi 14 years ago
parent
commit
e793a8b6f8
  1. 3
      ftplugin/eruby/eruby.xpt.vim
  2. 49
      ftplugin/html/html.xpt.vim
  3. 18
      ftplugin/ruby/ruby.xpt.vim

3
ftplugin/eruby/eruby.xpt.vim

@ -126,3 +126,6 @@ XPT javascript_include_tag synonym=jit " <%= javascript_include_tag...
XPT csrf_meta " <%= scrf_meta_tag %> XPT csrf_meta " <%= scrf_meta_tag %>
<%= csrf_meta_tag %> <%= csrf_meta_tag %>
XPT yield " <%= yield -%>
<%= yield -%>

49
ftplugin/html/html.xpt.vim

@ -37,13 +37,13 @@ XPT doctype5 synonym=doc5 " <!DOCTYPE html>
XPT charset " <meta charset... XPT charset " <meta charset...
<meta charset="utf-8" /> <meta charset="utf-8" />
XPT skel abbr synonym=html|xhtml " xhtml skeleton
XPT skel synonym=html|xhtml " xhtml skeleton
XSET more=Echo('')
`:doctype5:^ `:doctype5:^
<html> <html>
<head> <head>
`:title:^ `:title:^
`:charset:^`
`author^
`:charset:^`more^
</head> </head>
<body> <body>
`cursor^ `cursor^
@ -74,7 +74,7 @@ XPT print alias=link
XSET src=print.css XSET src=print.css
XSET media=print XSET media=print
XPT jquery abbr synonym=jq " <script... src="jquery...
XPT jquery synonym=jq " <script... src="jquery...
XSET ver=$jq_ver XSET ver=$jq_ver
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/`ver^/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/`ver^/jquery.min.js"></script>
@ -83,7 +83,7 @@ XSET dir=$js_dir/
XSET src=$empty XSET src=$empty
<script type="text/javascript" src="`dir^`src^.js"></script> <script type="text/javascript" src="`dir^`src^.js"></script>
XPT jplug abbr synonym=jfile|jp|jf alias=script
XPT jplug synonym=jfile|jp|jf alias=script
XPT jscript synonym=js XPT jscript synonym=js
<script type="text/javascript"> <script type="text/javascript">
@ -104,36 +104,48 @@ XSET val|post=Echo(V()=~'\V\^ id=""\$\|val' ? '' : V())
</div> </div>
<!--`val^ --> <!--`val^ -->
XPT h1 abbr alias=_tag
XPT h2 abbr alias=_tag
XPT h3 abbr alias=_tag
XPT h4 abbr alias=_tag
XPT h5 abbr alias=_tag
XPT h6 abbr alias=_tag
XPT span alias=tagAttr XPT span alias=tagAttr
XPT div alias=tagAttr XPT div alias=tagAttr
XPT p alias=tagAttr XPT p alias=tagAttr
XPT tr abbr alias=tagAttr
XPT tr alias=tagAttr
XPT td abbr alias=tagAttr
XPT td alias=tagAttr
XPT ul abbr alias=tagAttr
XPT ul alias=tagAttr
XPT ol abbr alias=tagAttr
XPT ol alias=tagAttr
XPT dl abbr alias=tagAttr
XPT dl alias=tagAttr
XPT dt abbr alias=tagAttr
XPT dt alias=tagAttr
XPT dd abbr alias=tagAttr
XPT dd alias=tagAttr
XPT br abbr alias=_shorttag
XPT br alias=_shorttag
XPT li abbr " <li>..</li>...
XPT li " <li>..</li>...
XSET content=Echo('') XSET content=Echo('')
<li>`content^</li>` <li>`content^</li>`
`...^ `...^
<li>`content^</li>` <li>`content^</li>`
`...^ `...^
XPT lia abbr " <li><a href=...
XPT lia " <li><a href=...
XSET href=# XSET href=#
`:li( { 'content' : ':a:' } ):^ `:li( { 'content' : ':a:' } ):^
@ -172,12 +184,7 @@ XPT aside alias=tagAttr
XPT footer alias=tagAttr XPT footer alias=tagAttr
XPT nav " <nav class="...
<nav` `att?^>
<ul>
`:lia:^
</ul>
</nav>
XPT nav alias=tagAttr
XPT html5shiv synonym=shiv,5shiv XPT html5shiv synonym=shiv,5shiv
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>

18
ftplugin/ruby/ruby.xpt.vim

@ -2,10 +2,12 @@
" "
XPTemplate priority=personal+ XPTemplate priority=personal+
XPT def " def .. end
XSET action=Echo(' ')
def `method^`
`action^
XPT def abbr " def .. end
def `cursor^
end
XPT if " if .. end
if `cursor^
end end
XPT attr " attr_** XPT attr " attr_**
@ -53,10 +55,10 @@ 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?^)
XPT loop wrap=content synonym=lambda " $_xSnipName args? do .. end
XPT loop synonym=lambda " $_xSnipName args? do .. end
XSET content=Echo('') XSET content=Echo('')
`$_xSnipName^` `args^ do `$_xSnipName^` `args^ do
` `content^
` `cursor^
end end
XPT doe abbr " do .. end XPT doe abbr " do .. end
@ -102,5 +104,5 @@ 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(`^)
XPT hvs abbr " have_selector
have_selector