2014-02-26 03:31:33 -05:00
|
|
|
priority -50
|
|
|
|
|
2013-03-17 15:13:47 -04:00
|
|
|
###########################################################################
|
|
|
|
# TextMate Snippets #
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
global !p
|
|
|
|
def x(snip):
|
2014-02-26 03:31:33 -05:00
|
|
|
if snip.ft.startswith("x"):
|
|
|
|
snip.rv = '/'
|
|
|
|
else:
|
|
|
|
snip.rv = ""
|
2013-03-17 15:13:47 -04:00
|
|
|
endglobal
|
|
|
|
|
|
|
|
############
|
|
|
|
# Doctypes #
|
|
|
|
############
|
|
|
|
snippet doctype "DocType XHTML 1.0 Strict" b
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
|
|
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet doctype "DocType XHTML 1.0 Transitional" b
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet doctype "DocType XHTML 1.1" b
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
|
|
|
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
|
|
|
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet doctype "HTML - 4.0 Transitional (doctype)" b
|
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
|
|
"http://www.w3.org/TR/html4/loose.dtd">
|
|
|
|
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet doctype "HTML - 5.0 (doctype)" b
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
#############
|
|
|
|
# Shortcuts #
|
|
|
|
#############
|
|
|
|
snippet down "Down (down)"
|
|
|
|
↓
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet enter "Enter (enter)"
|
|
|
|
⌅
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet escape "Escape (escape)"
|
|
|
|
⎋
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet shift "Shift (shift)"
|
|
|
|
⇧
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet tab "Tab (tab)"
|
|
|
|
⇥
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet up "Up (up)"
|
|
|
|
↑
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
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"
|
|
|
|
<!--[if IE 5.0]>${1:IE Conditional Comment: Internet Explorer 5.0 only }<![endif]-->$0
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet ! "IE Conditional Comment: Internet Explorer 5_5 only"
|
|
|
|
<!--[if IE 5.5000]>${1:IE Conditional Comment: Internet Explorer 5.5 only }<![endif]-->$0
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet ! "IE Conditional Comment: Internet Explorer 5_x"
|
|
|
|
<!--[if lt IE 6]>${1:IE Conditional Comment: Internet Explorer 5.x }<![endif]-->$0
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet ! "IE Conditional Comment: Internet Explorer 6 and below"
|
|
|
|
<!--[if lte IE 6]>${1:IE Conditional Comment: Internet Explorer 6 and below }<![endif]-->$0
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet ! "IE Conditional Comment: Internet Explorer 6 only"
|
|
|
|
<!--[if IE 6]>${1:IE Conditional Comment: Internet Explorer 6 only }<![endif]-->$0
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet ! "IE Conditional Comment: Internet Explorer 7+"
|
|
|
|
<!--[if gte IE 7]>${1:IE Conditional Comment: Internet Explorer 7 and above }<![endif]-->$0
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet ! "IE Conditional Comment: Internet Explorer"
|
|
|
|
<!--[if IE]>${1: IE Conditional Comment: Internet Explorer }<![endif]-->$0
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet ! "IE Conditional Comment: NOT Internet Explorer"
|
|
|
|
<!--[if !IE]><!-->${1: IE Conditional Comment: NOT Internet Explorer }<!-- <![endif]-->$0
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
#############
|
|
|
|
# HTML TAGS #
|
|
|
|
#############
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet input "Input with Label" w
|
2013-03-17 15:13:47 -04:00
|
|
|
<label for="${2:${1/[[:alpha:]]+|( )/(?1:_:\L$0)/g}}">$1</label><input type="${3:text/submit/hidden/button}" name="${4:$2}" value="$5"${6: id="${7:$2}"}`!p x(snip)`>
|
|
|
|
|
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet input "XHTML <input>" w
|
2013-03-17 15:13:47 -04:00
|
|
|
<input type="${1:text/submit/hidden/button}" name="${2:some_name}" value="$3"${4: id="${5:$2}"}`!p x(snip)`>
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet opt "Option" w
|
2013-03-17 15:13:47 -04:00
|
|
|
<option${1: value="${2:option}"}>${3:$2}</option>
|
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet select "Select Box" w
|
2013-03-17 15:13:47 -04:00
|
|
|
<select name="${1:some_name}" id="${2:$1}"${3:${4: multiple}${5: onchange="${6:}"}${7: size="${8:1}"}}>
|
|
|
|
<option${9: value="${10:option1}"}>${11:$10}</option>
|
|
|
|
<option${12: value="${13:option2}"}>${14:$13}</option>${15:}
|
|
|
|
$0
|
|
|
|
</select>
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet textarea "XHTML <textarea>" w
|
2013-03-17 15:13:47 -04:00
|
|
|
<textarea name="${1:Name}" rows="${2:8}" cols="${3:40}">$0</textarea>
|
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet mailto "XHTML <a mailto: >" w
|
2013-03-17 15:13:47 -04:00
|
|
|
<a href="mailto:${1:joe@example.com}?subject=${2:feedback}">${3:email me}</a>
|
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet base "XHTML <base>" w
|
2013-03-17 15:13:47 -04:00
|
|
|
<base href="$1"${2: target="$3"}`!p x(snip)`>
|
|
|
|
endsnippet
|
|
|
|
|
2015-03-04 09:43:15 -05:00
|
|
|
snippet body "<body>"
|
|
|
|
<body>
|
2016-07-19 19:29:56 -04:00
|
|
|
${0:${VISUAL}}
|
2013-03-17 15:13:47 -04:00
|
|
|
</body>
|
|
|
|
endsnippet
|
|
|
|
|
2015-03-04 09:43:15 -05:00
|
|
|
snippet div "<div>" w
|
|
|
|
<div>
|
2016-07-19 19:29:56 -04:00
|
|
|
${0:${VISUAL}}
|
2015-03-04 09:43:15 -05:00
|
|
|
</div>
|
|
|
|
endsnippet
|
|
|
|
|
2014-10-17 05:12:50 -04:00
|
|
|
snippet div. "<div> with class" w
|
|
|
|
<div`!p snip.rv=' class="' if t[1] else ""`${1:name}`!p snip.rv = '"' if t[1] else ""`>
|
2016-07-19 19:29:56 -04:00
|
|
|
${0:${VISUAL}}
|
2014-10-17 05:01:51 -04:00
|
|
|
</div>
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet div# "<div> with ID & class" w
|
2014-02-26 03:31:33 -05:00
|
|
|
<div`!p snip.rv=' id="' if t[1] else ""`${1:name}`!p snip.rv = '"' if t[1] else ""``!p snip.rv=' class="' if t[2] else ""`${2:name}`!p snip.rv = '"' if t[2] else ""`>
|
2016-07-19 19:29:56 -04:00
|
|
|
${0:${VISUAL}}
|
2013-03-17 15:13:47 -04:00
|
|
|
</div>
|
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet form "XHTML <form>" w
|
2013-03-17 15:13:47 -04:00
|
|
|
<form action="${1:`!p
|
|
|
|
snip.rv = (snip.basename or 'unnamed') + '_submit'
|
|
|
|
`}" method="${2:get}" accept-charset="utf-8">
|
2016-07-19 19:29:56 -04:00
|
|
|
${0:${VISUAL}}
|
2013-03-17 15:13:47 -04:00
|
|
|
|
|
|
|
<p><input type="submit" value="Continue →"`!p x(snip)`></p>
|
|
|
|
</form>
|
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet h1 "XHTML <h1>" w
|
2016-07-19 19:29:56 -04:00
|
|
|
<h1>${0:${VISUAL}}</h1>
|
2013-03-17 15:13:47 -04:00
|
|
|
endsnippet
|
|
|
|
|
2015-03-16 18:50:34 -04:00
|
|
|
snippet h2 "XHTML <h2>" w
|
2016-07-19 19:29:56 -04:00
|
|
|
<h2>${0:${VISUAL}}</h2>
|
2015-03-16 18:50:34 -04:00
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet h3 "XHTML <h3>" w
|
2016-07-19 19:29:56 -04:00
|
|
|
<h3>${0:${VISUAL}}</h3>
|
2015-03-16 18:50:34 -04:00
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet h4 "XHTML <h4>" w
|
2016-07-19 19:29:56 -04:00
|
|
|
<h4>${0:${VISUAL}}</h4>
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet h5 "XHTML <h5>" w
|
|
|
|
<h5>${0:${VISUAL}}</h5>
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet h6 "XHTML <h6>" w
|
|
|
|
<h6>${0:${VISUAL}}</h6>
|
2015-03-16 18:50:34 -04:00
|
|
|
endsnippet
|
|
|
|
|
2013-03-17 15:13:47 -04:00
|
|
|
snippet head "XHTML <head>"
|
|
|
|
<head>
|
2014-04-10 05:13:17 -04:00
|
|
|
<meta charset="utf-8">
|
2013-03-17 15:13:47 -04:00
|
|
|
<title>${1:`!p snip.rv = snip.basename or "Page Title"`}</title>
|
2016-07-19 19:29:56 -04:00
|
|
|
${0:${VISUAL}}
|
2013-03-17 15:13:47 -04:00
|
|
|
</head>
|
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet link "XHTML <link>" w
|
2013-03-17 15:13:47 -04:00
|
|
|
<link rel="${1:stylesheet}" href="${2:/css/master.css}" type="text/css" media="${3:screen}" title="${4:no title}" charset="${5:utf-8}"`!p x(snip)`>
|
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet meta "XHTML <meta>" w
|
2013-03-17 15:13:47 -04:00
|
|
|
<meta name="${1:name}" content="${2:content}"`!p x(snip)`>
|
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet scriptsrc "XHTML <script src...>" w
|
2013-03-17 15:13:47 -04:00
|
|
|
<script src="$1" type="text/javascript" charset="${3:utf-8}"></script>
|
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet script "XHTML <script>" w
|
2013-03-17 15:13:47 -04:00
|
|
|
<script type="text/javascript" charset="utf-8">
|
2016-07-19 19:29:56 -04:00
|
|
|
${0:${VISUAL}}
|
2013-03-17 15:13:47 -04:00
|
|
|
</script>
|
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet style "XHTML <style>" w
|
2013-03-17 15:13:47 -04:00
|
|
|
<style type="text/css" media="screen">
|
2016-07-19 19:29:56 -04:00
|
|
|
${0:${VISUAL}}
|
2013-03-17 15:13:47 -04:00
|
|
|
</style>
|
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet table "XHTML <table>" w
|
2013-03-17 15:13:47 -04:00
|
|
|
<table border="${1:0}"${2: cellspacing="${3:5}" cellpadding="${4:5}"}>
|
|
|
|
<tr><th>${5:Header}</th></tr>
|
|
|
|
<tr><td>${0:Data}</td></tr>
|
|
|
|
</table>
|
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet a "Link" w
|
2013-03-17 15:13:47 -04:00
|
|
|
<a href="${1:http://www.${2:url.com}}"${3: target="_blank"}>${4:Anchor Text}</a>
|
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet p "paragraph" w
|
2016-07-19 19:29:56 -04:00
|
|
|
<p>${0:${VISUAL}}</p>
|
2013-03-17 15:13:47 -04:00
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet li "list item" w
|
2016-07-19 19:29:56 -04:00
|
|
|
<li>${0:${VISUAL}}</li>
|
2013-03-17 15:13:47 -04:00
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet ul "unordered list" w
|
2013-03-17 15:13:47 -04:00
|
|
|
<ul>
|
2016-07-19 19:29:56 -04:00
|
|
|
${0:${VISUAL}}
|
2013-03-17 15:13:47 -04:00
|
|
|
</ul>
|
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet td "table cell" w
|
2016-07-19 19:29:56 -04:00
|
|
|
<td>${0:${VISUAL}}</td>
|
2013-03-17 15:13:47 -04:00
|
|
|
endsnippet
|
|
|
|
|
2014-08-29 16:44:54 -04:00
|
|
|
snippet th "table header" w
|
2016-07-19 19:29:56 -04:00
|
|
|
<th>${0:${VISUAL}}</th>
|
2014-08-29 16:44:54 -04:00
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet tr "table row" w
|
2016-07-19 19:29:56 -04:00
|
|
|
<tr>${0:${VISUAL}}</tr>
|
2013-03-17 15:13:47 -04:00
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet title "XHTML <title>" w
|
2013-03-17 15:13:47 -04:00
|
|
|
<title>${1:`!p snip.rv = snip.basename or "Page Title"`}</title>
|
|
|
|
endsnippet
|
|
|
|
|
2014-02-26 03:31:33 -05:00
|
|
|
snippet fieldset "Fieldset" w
|
2013-03-17 15:13:47 -04:00
|
|
|
<fieldset id="${1/[\w\d]+|( )/(?1:_:\L$0\E)/g}" ${2:class="${3:}"}>
|
|
|
|
<legend>$1</legend>
|
2016-07-19 19:29:56 -04:00
|
|
|
${0:${VISUAL}}
|
2013-03-17 15:13:47 -04:00
|
|
|
</fieldset>
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet movie "Embed QT movie (movie)" b
|
|
|
|
<object width="$2" height="$3" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
|
|
|
|
<param name="src" value="$1"`!p x(snip)`>
|
|
|
|
<param name="controller" value="$4"`!p x(snip)`>
|
|
|
|
<param name="autoplay" value="$5"`!p x(snip)`>
|
|
|
|
<embed src="${1:movie.mov}"
|
|
|
|
width="${2:320}" height="${3:240}"
|
|
|
|
controller="${4:true}" autoplay="${5:true}"
|
|
|
|
scale="tofit" cache="true"
|
|
|
|
pluginspage="http://www.apple.com/quicktime/download/"
|
|
|
|
`!p x(snip)`>
|
|
|
|
</object>
|
|
|
|
endsnippet
|
|
|
|
# vim:ft=snippets:
|