html.snippets 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. # Some useful Unicode entities
  2. # Non-Breaking Space
  3. snippet nbs
  4.  
  5. # ←
  6. snippet left
  7. ←
  8. # →
  9. snippet right
  10. →
  11. # ↑
  12. snippet up
  13. ↑
  14. # ↓
  15. snippet down
  16. ↓
  17. # ↩
  18. snippet return
  19. ↩
  20. # ⇤
  21. snippet backtab
  22. ⇤
  23. # ⇥
  24. snippet tab
  25. ⇥
  26. # ⇧
  27. snippet shift
  28. ⇧
  29. # ⌃
  30. snippet control
  31. ⌃
  32. # ⌅
  33. snippet enter
  34. ⌅
  35. # ⌘
  36. snippet command
  37. ⌘
  38. # ⌥
  39. snippet option
  40. ⌥
  41. # ⌦
  42. snippet delete
  43. ⌦
  44. # ⌫
  45. snippet backspace
  46. ⌫
  47. # ⎋
  48. snippet escape
  49. ⎋
  50. # Generic Doctype
  51. snippet doctype HTML 4.01 Strict
  52. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  53. "http://www.w3.org/TR/html4/strict.dtd">
  54. snippet doctype HTML 4.01 Transitional
  55. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  56. "http://www.w3.org/TR/html4/loose.dtd">
  57. snippet doctype HTML 5
  58. <!DOCTYPE HTML>
  59. snippet doctype XHTML 1.0 Frameset
  60. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  61. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  62. snippet doctype XHTML 1.0 Strict
  63. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  64. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  65. snippet doctype XHTML 1.0 Transitional
  66. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  67. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  68. snippet doctype XHTML 1.1
  69. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  70. "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  71. # HTML Doctype 4.01 Strict
  72. snippet docts
  73. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  74. "http://www.w3.org/TR/html4/strict.dtd">
  75. # HTML Doctype 4.01 Transitional
  76. snippet doct
  77. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  78. "http://www.w3.org/TR/html4/loose.dtd">
  79. # HTML Doctype 5
  80. snippet doct5
  81. <!DOCTYPE HTML>
  82. # XHTML Doctype 1.0 Frameset
  83. snippet docxf
  84. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
  85. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
  86. # XHTML Doctype 1.0 Strict
  87. snippet docxs
  88. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  89. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  90. # XHTML Doctype 1.0 Transitional
  91. snippet docxt
  92. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  93. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  94. # XHTML Doctype 1.1
  95. snippet docx
  96. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  97. "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  98. snippet html
  99. <html>
  100. ${1}
  101. </html>
  102. snippet xhtml
  103. <html xmlns="http://www.w3.org/1999/xhtml">
  104. ${1}
  105. </html>
  106. snippet body
  107. <body>
  108. ${1}
  109. </body>
  110. snippet head
  111. <head>
  112. <meta http-equiv="content-type" content="text/html; charset=utf-8"`Close()`>
  113. <title>${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`}</title>
  114. ${2}
  115. </head>
  116. snippet title
  117. <title>${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`}</title>${2}
  118. snippet script
  119. <script type="text/javascript" charset="utf-8">
  120. ${1}
  121. </script>${2}
  122. snippet scriptsrc
  123. <script src="${1}.js" type="text/javascript" charset="utf-8"></script>${2}
  124. snippet style
  125. <style type="text/css" media="${1:screen}">
  126. ${2}
  127. </style>${3}
  128. snippet base
  129. <base href="${1}" target="${2}"`Close()`>
  130. snippet r
  131. <br`Close()[1:]`>
  132. snippet div
  133. <div id="${1:name}">
  134. ${2}
  135. </div>
  136. # Embed QT Movie
  137. snippet movie
  138. <object width="$2" height="$3" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
  139. codebase="http://www.apple.com/qtactivex/qtplugin.cab">
  140. <param name="src" value="$1"`Close()`>
  141. <param name="controller" value="$4"`Close()`>
  142. <param name="autoplay" value="$5"`Close()`>
  143. <embed src="${1:movie.mov}"
  144. width="${2:320}" height="${3:240}"
  145. controller="${4:true}" autoplay="${5:true}"
  146. scale="tofit" cache="true"
  147. pluginspage="http://www.apple.com/quicktime/download/"
  148. `Close()[1:]`>
  149. </object>${6}
  150. snippet fieldset
  151. <fieldset id="$1">
  152. <legend>${1:name}</legend>
  153. ${3}
  154. </fieldset>
  155. snippet form
  156. <form action="${1:`Filename('$1_submit')`}" method="${2:get}" accept-charset="utf-8">
  157. ${3}
  158. <p><input type="submit" value="Continue &rarr;"`Close()`></p>
  159. </form>
  160. snippet h1
  161. <h1 id="${1:heading}">${2:$1}</h1>
  162. snippet input
  163. <input type="${1:text/submit/hidden/button}" name="${2:some_name}" value="${3}"`Close()`>${4}
  164. snippet label
  165. <label for="${2:$1}">${1:name}</label><input type="${3:text/submit/hidden/button}" name="${4:$2}" value="${5}" id="${6:$2}"`Close()`>${7}
  166. snippet link
  167. <link rel="${1:stylesheet}" href="${2:/css/master.css}" type="text/css" media="${3:screen}" charset="utf-8"`Close()`>${4}
  168. snippet mailto
  169. <a href="mailto:${1:joe@example.com}?subject=${2:feedback}">${3:email me}</a>
  170. snippet meta
  171. <meta name="${1:name}" content="${2:content}"`Close()`>${3}
  172. snippet opt
  173. <option value="${1:option}">${2:$1}</option>${3}
  174. snippet optt
  175. <option>${1:option}</option>${2}
  176. snippet select
  177. <select name="${1:some_name}" id="${2:$1}">
  178. <option value="${3:option}">${4:$3}</option>
  179. </select>${5}
  180. snippet table
  181. <table border="${1:0}">
  182. <tr><th>${2:Header}</th></tr>
  183. <tr><th>${3:Data}</th></tr>
  184. </table>${4}
  185. snippet textarea
  186. <textarea name="${1:Name}" rows="${2:8}" cols="${3:40}">${4}</textarea>${5}