From 22804a2cbba10569a4ac42457152a4fdf38e38ae Mon Sep 17 00:00:00 2001 From: Holger Rapp Date: Wed, 29 Jul 2009 19:29:28 +0200 Subject: [PATCH] Cleaned up HTML snippets --- UltiSnips/{tm_html.snippets => html.snippets} | 250 ++++++++++-------- 1 file changed, 139 insertions(+), 111 deletions(-) rename UltiSnips/{tm_html.snippets => html.snippets} (61%) diff --git a/UltiSnips/tm_html.snippets b/UltiSnips/html.snippets similarity index 61% rename from UltiSnips/tm_html.snippets rename to UltiSnips/html.snippets index c420ea4..976fcea 100644 --- a/UltiSnips/tm_html.snippets +++ b/UltiSnips/html.snippets @@ -1,43 +1,40 @@ ########################################################################### # TextMate Snippets # ########################################################################### - -snippet doctype "DocType XHTML 1.0 Strict" +############ +# Doctypes # +############ +snippet doctype "DocType XHTML 1.0 Strict" b endsnippet -snippet doctype "DocType XHTML 1.0 Transitional" +snippet doctype "DocType XHTML 1.0 Transitional" b endsnippet -snippet doctype "DocType XHTML 1.1" +snippet doctype "DocType XHTML 1.1" b endsnippet -snippet down "Down (down)" -↓ +snippet doctype "HTML - 4.0 Transitional (doctype)" b + + endsnippet -snippet movie "Embed QT movie (movie)" - - - - - - + +############# +# Shortcuts # +############# +snippet down "Down (down)" +↓ endsnippet snippet enter "Enter (enter)" @@ -48,85 +45,6 @@ snippet escape "Escape (escape)" ⎋ endsnippet -snippet fieldset "Fieldset" -
- - - $0 -
-endsnippet - -snippet doctype "HTML - 4.0 Transitional (doctype)" - - -endsnippet - -snippet ! "IE Conditional Comment: Internet Explorer 5_0 only" -$0 -endsnippet - -snippet ! "IE Conditional Comment: Internet Explorer 5_5 only" -$0 -endsnippet - -snippet ! "IE Conditional Comment: Internet Explorer 5_x" -$0 -endsnippet - -snippet ! "IE Conditional Comment: Internet Explorer 6 and below" -$0 -endsnippet - -snippet ! "IE Conditional Comment: Internet Explorer 6 only" -$0 -endsnippet - -snippet ! "IE Conditional Comment: Internet Explorer 7+" -$0 -endsnippet - -snippet ! "IE Conditional Comment: Internet Explorer" -$0 -endsnippet - -snippet ! "IE Conditional Comment: NOT Internet Explorer" -${1:${TM_SELECTED_TEXT: IE Conditional Comment: NOT Internet Explorer }}$0 -endsnippet - -snippet input "Input with Label" - - -endsnippet - -snippet left "Left (left)" -← -endsnippet - -snippet option "Option (option)" -⌥ -endsnippet - -snippet opt "Option" -${3:$2} -endsnippet - -snippet return "Return (return)" -↩ -endsnippet - -snippet right "Right (right)" -→ -endsnippet - -snippet select "Select Box" - -endsnippet - snippet shift "Shift (shift)" ⇧ endsnippet @@ -139,10 +57,83 @@ snippet up "Up (up)" ↑ endsnippet -snippet input "XHTML " - +snippet return "Return (return)" +↩ endsnippet +snippet right "Right (right)" +→ +endsnippet + +snippet left "Left (left)" +← +endsnippet + +snippet option "Option (option)" +⌥ +endsnippet + +####################### +# Conditional inserts # +####################### +snippet ! "IE Conditional Comment: Internet Explorer 5_0 only" +$0 +endsnippet + +snippet ! "IE Conditional Comment: Internet Explorer 5_5 only" +$0 +endsnippet + +snippet ! "IE Conditional Comment: Internet Explorer 5_x" +$0 +endsnippet + +snippet ! "IE Conditional Comment: Internet Explorer 6 and below" +$0 +endsnippet + +snippet ! "IE Conditional Comment: Internet Explorer 6 only" +$0 +endsnippet + +snippet ! "IE Conditional Comment: Internet Explorer 7+" +$0 +endsnippet + +snippet ! "IE Conditional Comment: Internet Explorer" +$0 +endsnippet + +snippet ! "IE Conditional Comment: NOT Internet Explorer" +${1: IE Conditional Comment: NOT Internet Explorer }$0 +endsnippet + +############# +# HTML TAGS # +############# +snippet input "Input with Label" + + +endsnippet + +snippet input "XHTML " + +endsnippet + + +snippet opt "Option" +${3:$2} +endsnippet + +snippet select "Select Box" + +endsnippet + + snippet textarea "XHTML endsnippet @@ -152,47 +143,59 @@ snippet mailto "XHTML " endsnippet snippet base "XHTML " - + endsnippet snippet body "XHTML " - + $0 endsnippet snippet div "XHTML
" - ${0:$TM_SELECTED_TEXT} + $0
endsnippet snippet form "XHTML
" - + $0 -

+

endsnippet snippet h1 "XHTML

" -

${1:$TM_SELECTED_TEXT}

+

${1}

endsnippet snippet head "XHTML " - - ${1:${TM_FILENAME/((.+)\..*)?/(?2:$2:Page Title)/}} + + ${1:`!p if len(fn): + res = fn.split('.')[-2] +else: + res = "Page Title"`} $0 endsnippet snippet link "XHTML " - + endsnippet snippet meta "XHTML " - + endsnippet snippet scriptsrc "XHTML