A collection of HTML5 and other snippets I've found useful which aren't included in the default HTML bundle. HTML5 is used loosely, mainly to distinguish itself from the default bundle.
Includes:
- HTML5 templates
- HTML5 element snippets (e.g. video, canvas, article, header, etc.)
- Other useful snippets not included in the default HTML bundle (e.g. img, h1-6, a, etc.)
- Google hosted code library links (e.g. jquery, yui, swfobject etc.)
Some of the snippets are from the mHTML bundle available from Minimal Designs.
- link (absolute) : a ⇥
- link (relative) : a ⇥
- abbreviation : abbr ⇥
- article : art ⇥
- aside : aside ⇥
- audio : audio ⇥
- line break : br ⇥, ⇧ + ↩
- blockquote : bq ⇥
- canvas : canvas ⇥
- cite : cite ⇥
- clear : clear ⇥
- code : code ⇥
- details : details ⇥
- div : div ⇥
- detailed list : dl ⇥
- detailed item : dt ⇥
- fieldset : fie ⇥
- figure : figure ⇥
- footer : footer ⇥
- form : form ⇥
- heading 1 : h1 ⇥
- heading 2 : h2 ⇥
- heading 3 : h3 ⇥
- heading 4 : h4 ⇥
- heading 5 : h5 ⇥
- heading 6 : h6 ⇥
- header : header ⇥
- HTML5 : html5 ⇥
- image : img ⇥
- label : lab ⇥
- legend : leg ⇥
- list item : li ⇥
- menu : menu ⇥
- nav : nav ⇥
- wrap selected items in nav/li : ⌃ + ⌘ + l
- ordered list : ol ⇥
- option : opt ⇥
- option group : optgr ⇥
- paragraph : p ⇥
- pre : pre ⇥
- progress: progress ⇥
- quote : q ⇥
- section : section ⇥
- select : sel ⇥
- source : source ⇥
- span : span ⇥
- textarea : tex ⇥
- unordered list : ul ⇥
- wrap selected items in ul : ⌃ + ⌘ + l
- wrap selected items in ul/links : ⌃ + ⌘ + l
- video : video ⇥
Code library links
- jquery : jquery ⇥
- jqueryui : jqueryui ⇥
- yui : yui ⇥
- prototype : prototype ⇥
- script.aculo.us : scripty ⇥
- dojo : dojo ⇥
- mootools : mootools ⇥
- ext : extjs ⇥
- swfobject : swfobject ⇥
- chrome frame : chrome ⇥
- google web font loader : webfonts ⇥
Using git
Open Terminal and navigate to the Textmate application support folder, i.e.
cd ~/Library/Application\ Support/TextMate/Bundles/
Clone the git repository
git clone git@github.com:rlayte/html5.tmbundle.git
Reload the bundles either from the Textmate menu or
osascript -e 'tell app "TextMate" to reload bundles'
Without git
- click on the download soruce link near the top of the page.
- unzip and rename folder to html5.tmbundle
- double click on the bundle
(The MIT License)
Copyright (c) 2010 Richard Layte
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.