Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Initial Import

  • Loading branch information...
commit 1baa74b7d6b081e12f2c24f2e408c48b1509a92e 0 parents
@minimalweb authored
69 CodeSenseLibraries/HTML5-attributes.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+CodeSense Libraries simply define lists of completions, categorized by keys. They don't define any criteria for when they should be used; this is the domain of a CodeSense Provider.
+
+-->
+<codesense version="1.0">
+
+ <behavior>
+ <append-dynamic>
+ <matched-suffix>(\s*=)|[^=]</matched-suffix>
+ <transform-into>(?1::="$1"$0)</transform-into>
+ </append-dynamic>
+ </behavior>
+
+ <set name="de.minimalweb.html5.tag.audio.attributes">
+ <completion string="src" />
+ <completion string="preload" />
+ <completion string="autoplay" />
+ <completion string="loop" />
+ <completion string="controls" />
+ </set>
+
+ <set name="de.minimalweb.html5.tag.input.attributes">
+ <completion string="autocomplete" />
+ <completion string="autofocus" />
+ <completion string="list" />
+ <completion string="required" />
+ <completion string="multiple" />
+ <completion string="pattern" />
+ <completion string="min" />
+ <completion string="max" />
+ <completion string="step" />
+ <completion string="placeholder" />
+ </set>
+
+ <set name="de.minimalweb.html5.tag.meter.attributes">
+ <completion string="max" />
+ <completion string="min" />
+ <completion string="high" />
+ <completion string="low" />
+ <completion string="optimum" />
+ <completion string="value" />
+ </set>
+
+ <set name="de.minimalweb.html5.tag.progress.attributes">
+ <completion string="max" />
+ <completion string="min" />
+ <completion string="value" />
+ </set>
+
+ <set name="de.minimalweb.html5.tag.source.attributes">
+ <completion string="src" />
+ <completion string="type" />
+ <completion string="media" />
+ </set>
+
+ <set name="de.minimalweb.html5.tag.video.attributes">
+ <completion string="src" />
+ <completion string="poster" />
+ <completion string="preload" />
+ <completion string="autoplay" />
+ <completion string="loop" />
+ <completion string="controls" />
+ <completion string="width" />
+ <completion string="height" />
+ </set>
+
+</codesense>
37 CodeSenseLibraries/HTML5-attributevalues.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+CodeSense Libraries simply define lists of completions, categorized by keys. They don't define any criteria for when they should be used; this is the domain of a CodeSense Provider.
+
+-->
+<codesense version="1.0">
+
+ <set name="de.minimalweb.html5.tag.input.attribute-values.type">
+ <completion string="search" />
+ <completion string="tel" />
+ <completion string="email" />
+ <completion string="url" />
+ <completion string="datetime" />
+ <completion string="datetime-local" />
+ <completion string="date" />
+ <completion string="month" />
+ <completion string="week" />
+ <completion string="time" />
+ <completion string="number" />
+ <completion string="range" />
+ <completion string="color" />
+ </set>
+
+ <set name="de.minimalweb.html5.tag.audio.attribute-values.preload">
+ <completion string="none" />
+ <completion string="metadata" />
+ <completion string="auto" />
+ </set>
+
+ <set name="de.minimalweb.html5.tag.video.attribute-values.preload">
+ <completion string="none" />
+ <completion string="metadata" />
+ <completion string="auto" />
+ </set>
+
+</codesense>
103 CodeSenseLibraries/HTML5.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+CodeSense Libraries simply define lists of completions, categorized by keys. They don't define any criteria for when they should be used; this is the domain of a CodeSense Provider.
+
+-->
+<codesense version="1.0">
+
+ <set name="de.minimalweb.html5.tags">
+
+ <!-- Default behavior -->
+ <behavior>
+ <append-dynamic>
+ <matched-suffix>(\s*:)|[^:]</matched-suffix>
+ <transform-into>(?1::>$0&lt;/${completion}>)</transform-into>
+ </append-dynamic>
+ </behavior>
+
+ <completion string="audio">
+ <behavior>
+ <append-dynamic>
+ <matched-suffix>(\s*:)|[^:]</matched-suffix>
+ <transform-into>(?1:: src="${1:audiofile}"${2: preload="${3:none}"}${4: controls}>$0&lt;/${completion}>)</transform-into>
+ </append-dynamic>
+ </behavior>
+ </completion>
+
+ <completion string="datalist">
+ <behavior>
+ <append-dynamic>
+ <matched-suffix>(\s*:)|[^:]</matched-suffix>
+ <transform-into>(?1::${1: id="$2"}>$0&lt;/${completion}>)</transform-into>
+ </append-dynamic>
+ </behavior>
+ </completion>
+
+ <completion string="footer">
+ <behavior>
+ <append-dynamic>
+ <matched-suffix>(\s*:)|[^:]</matched-suffix>
+ <transform-into>(?1::${1: id="$2"}>$0&lt;/${completion}>)</transform-into>
+ </append-dynamic>
+ </behavior>
+ </completion>
+
+ <completion string="header">
+ <behavior>
+ <append-dynamic>
+ <matched-suffix>(\s*:)|[^:]</matched-suffix>
+ <transform-into>(?1::${1: id="$2"}>$0&lt;/${completion}>)</transform-into>
+ </append-dynamic>
+ </behavior>
+ </completion>
+
+ <completion string="nav">
+ <behavior>
+ <append-dynamic>
+ <matched-suffix>(\s*:)|[^:]</matched-suffix>
+ <transform-into>(?1::${1: id="$2"}>$0&lt;/${completion}>)</transform-into>
+ </append-dynamic>
+ </behavior>
+ </completion>
+
+ <completion string="source">
+ <behavior>
+ <append-dynamic>
+ <matched-suffix>(\s*:)|[^:]</matched-suffix>
+ <transform-into>(?1:: src="${1:videofile}" type="$2"${3: /}>$0)</transform-into>
+ </append-dynamic>
+ </behavior>
+ </completion>
+
+ <completion string="time">
+ <behavior>
+ <append-dynamic>
+ <matched-suffix>(\s*:)|[^:]</matched-suffix>
+ <transform-into>(?1::${1: datetime="$2"}>$0&lt;/${completion}>)</transform-into>
+ </append-dynamic>
+ </behavior>
+ </completion>
+
+ <completion string="video">
+ <behavior>
+ <append-dynamic>
+ <matched-suffix>(\s*:)|[^:]</matched-suffix>
+ <transform-into>(?1:: src="${1:videofile}"${2: preload="${3:none}"}${4: controls}>$0&lt;/${completion}>)</transform-into>
+ </append-dynamic>
+ </behavior>
+ </completion>
+
+ <completion string="article" />
+ <completion string="aside" />
+ <completion string="hgroup" />
+ <completion string="figure" />
+ <completion string="figcaption" />
+ <completion string="mark" />
+ <completion string="meter" />
+ <completion string="progress" />
+ <completion string="section" />
+ <completion string="track" />
+ </set>
+
+</codesense>
33 CodeSenseProviders/HTML5.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+CodeSense Providers map contexts in a document to possible completions. The actual completions are defined in the various CodeSense libraries, categorized using their key. A CodeSense Provider tells Espresso what CodeSense libraries are active in the current context. One of these XML files can contain many <provider> elements.
+
+-->
+<codesense>
+
+ <!-- HTML tags -->
+ <provider>
+ <selector>text.html - *, tag.open.html, tag.self-closing.html</selector>
+ <completions>de.minimalweb.html5.tags</completions>
+ <complete-match capture="2">(&lt;)([a-zA-Z0-9-]*)</complete-match>
+ <require-suffix>(\s|>|^)</require-suffix>
+ </provider>
+
+ <!-- HTML attributes -->
+ <provider>
+ <selector>tag.open.html:has-child(name:capture(tag)) > attribute-name, tag.open.html:has-child(name:capture(tag)) > punctuation.definition.end, tag.open.html:has-child(name:capture(tag))</selector>
+ <completions>de.minimalweb.html5.tag.${tag}.attributes</completions>
+ <complete-match capture="2">(\s)([a-zA-Z0-9-]*)</complete-match>
+ <require-suffix>(\s|=|>|^)</require-suffix>
+ </provider>
+
+ <!-- HTML attribute values -->
+ <provider>
+ <selector>tag.open.html:has-child(name:capture(tag)) > attribute-name:capture(attribute) + string > punctuation.end, tag.self-closing.html:has-child(name:capture(tag)) > attribute-name:capture(attribute) + string > punctuation.end</selector>
+ <completions>de.minimalweb.html5.tag.${tag}.attribute-values.${attribute}</completions>
+ <complete-match capture="2">("|'|)([a-zA-Z0-9-]*)</complete-match>
+ <!--require-suffix>(\s|>|^)</require-suffix-->
+ </provider>
+
+</codesense>
22 Contents/Info.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>HTML5</string>
+ <key>CFBundleIdentifier</key>
+ <string>de.minimalweb.Sugar.HTML5</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>HTML5</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+</dict>
+</plist>
11 Languages.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<settings>
+ <meta>
+ <name>HTML5.sugar</name>
+ <description>Tags and Completions for HTML5</description>
+ <author>Maurice</author>
+ <identifier>de.minimalweb.Sugar.HTML5</identifier>
+ <version status="release">0.1</version>
+ <download format="git">git://github.com/minimalweb/HTML5.sugar.git</download>
+ </meta>
+</settings>
9 README.markdown
@@ -0,0 +1,9 @@
+HTML5 Sugar
+===========
+
+This Sugar adds autocompletion for HTML5 tags and attributes.
+
+Installation
+============
+
+Download the source and put it in YourHomeFolder/Library/Application Support/Espresso/Sugars/
10 TextActions/Snippets.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<action-recipes>
+
+ <snippet id="de.minimalweb.TextActions.HTML5.html5forie" category="tools.Snippets">
+ <title>Javascript: HTML5 for IE</title>
+ <text><![CDATA[<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->]]></text>
+ <syntax-context>html, html *</syntax-context>
+ </snippet>
+
+</action-recipes>
Please sign in to comment.
Something went wrong with that request. Please try again.