[gedit/gnome-3-6] Refreshed mallard snippets to correspond with the Mallard 1.0 spec. Partially fixes bug 460523
- From: Jim Campbell <jcampbell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/gnome-3-6] Refreshed mallard snippets to correspond with the Mallard 1.0 spec. Partially fixes bug 460523
- Date: Mon, 25 Feb 2013 13:25:36 +0000 (UTC)
commit f6425bf0328c48f05ef6088d76e3b7096a85fb4c
Author: Jaromír Hradílek <jhradilek gmail com>
Date: Sat Feb 23 16:54:29 2013 +0100
Refreshed mallard snippets to correspond with the Mallard 1.0 spec. Partially fixes bug 460523
plugins/snippets/data/mallard.xml | 335 +++++++++++++++++++++++--------------
1 files changed, 212 insertions(+), 123 deletions(-)
---
diff --git a/plugins/snippets/data/mallard.xml b/plugins/snippets/data/mallard.xml
index b4e1f53..bb08b43 100644
--- a/plugins/snippets/data/mallard.xml
+++ b/plugins/snippets/data/mallard.xml
@@ -1,227 +1,316 @@
<?xml version='1.0' encoding='utf-8'?>
+<!--
+ Mallard 1.0 snippets according to Mallard 1.0 DRAFT (as of 2013-02-11)
+ Copyright (C) 2013 Jaromir Hradilek
+
+ Home Page: https://github.com/jhradilek/gedit-snippets
+ Last Change: 12 February 2013
+-->
<snippets language="mallard">
<snippet id="app">
- <text><![CDATA[<app>${1:Application's name}</app>$0]]></text>
+ <text><![CDATA[<app>${1}</app>]]></text>
<tag>app</tag>
<description>app</description>
</snippet>
- <snippet id="cdata">
- <text><![CDATA[<![CDATA[$0]]]]><![CDATA[>]]></text>
- <tag>cdata</tag>
- <description>cdata</description>
- </snippet>
<snippet id="cite">
- <text><![CDATA[<cite>${1:Joe Example}</cite>]]></text>
+ <text><![CDATA[<cite>${1}</cite>]]></text>
<tag>cite</tag>
<description>cite</description>
</snippet>
- <snippet id="cited">
- <text><![CDATA[<cite date="$1">${2:Joe Example}</cite>]]></text>
- <tag>cited</tag>
- <description>cite</description>
+ <snippet id="cmd">
+ <text><![CDATA[<cmd>${1}</cmd>]]></text>
+ <tag>cmd</tag>
+ <description>cmd</description>
+ </snippet>
+ <snippet id="code">
+ <text><![CDATA[<code>${1}</code>]]></text>
+ <tag>code</tag>
+ <description>code</description>
+ </snippet>
+ <snippet id="col">
+ <text><![CDATA[<col/>${1}]]></text>
+ <tag>col</tag>
+ <description>col</description>
+ </snippet>
+ <snippet id="colgroup">
+ <text><![CDATA[<colgroup>${1}</colgroup>]]></text>
+ <tag>colgroup</tag>
+ <description>colgroup</description>
+ </snippet>
+ <snippet id="comment">
+ <text><![CDATA[<comment>
+ ${1}
+</comment>]]></text>
+ <tag>comment</tag>
+ <description>comment</description>
+ </snippet>
+ <snippet id="credit">
+ <text><![CDATA[<credit type="${1:author}">
+ ${2}
+</credit>]]></text>
+ <tag>credit</tag>
+ <description>credit</description>
</snippet>
<snippet id="desc">
- <text><![CDATA[<desc>${1:Description.}</desc>]]></text>
+ <text><![CDATA[<desc>${1}</desc>]]></text>
<tag>desc</tag>
<description>desc</description>
</snippet>
<snippet id="em">
- <text><![CDATA[<em>$1</em>]]></text>
+ <text><![CDATA[<em>${1}</em>]]></text>
<tag>em</tag>
<description>em</description>
</snippet>
+ <snippet id="email">
+ <text><![CDATA[<email>${1}</email>]]></text>
+ <tag>email</tag>
+ <description>email</description>
+ </snippet>
+ <snippet id="example">
+ <text><![CDATA[<example>
+ ${1}
+</example>]]></text>
+ <tag>example</tag>
+ <description>example</description>
+ </snippet>
<snippet id="figure">
<text><![CDATA[<figure>
- <title>${1:Title}</title>
- <desc>${2:Short description.}</desc>
- <media type="${3:image}" mime="${5:image/png}" src="${4:figures/image.png}" >
- </media>
+ ${1}
</figure>]]></text>
<tag>figure</tag>
<description>figure</description>
</snippet>
<snippet id="file">
- <text><![CDATA[<file>${0:filename}</file>]]></text>
+ <text><![CDATA[<file>${1}</file>]]></text>
<tag>file</tag>
<description>file</description>
</snippet>
- <snippet id="g">
- <text><![CDATA[<gui>$1</gui>$2]]></text>
- <tag>g</tag>
+ <snippet id="gui">
+ <text><![CDATA[<gui>${1}</gui>]]></text>
+ <tag>gui</tag>
<description>gui</description>
</snippet>
- <snippet id="q">
- <text><![CDATA[<guiseq><gui>$1</gui><gui>$2</gui></guiseq>]]></text>
- <tag>q</tag>
+ <snippet id="guiseq">
+ <text><![CDATA[<guiseq>${1}</guiseq>]]></text>
+ <tag>guiseq</tag>
<description>guiseq</description>
</snippet>
- <snippet id="http">
- <text><![CDATA[<link href="http://${1:url}/">${2}</link>]]></text>
- <tag>http</tag>
- <description>http</description>
+ <snippet id="info">
+ <text><![CDATA[<info>
+ ${1}
+</info>]]></text>
+ <tag>info</tag>
+ <description>info</description>
+ </snippet>
+ <snippet id="input">
+ <text><![CDATA[<input>${1}</input>]]></text>
+ <tag>input</tag>
+ <description>input</description>
</snippet>
<snippet id="item">
- <text><![CDATA[<item><p>$0</p></item>]]></text>
+ <text><![CDATA[<item>${1}</item>]]></text>
<tag>item</tag>
<description>item</description>
</snippet>
<snippet id="key">
- <text><![CDATA[<key>$1</key>]]></text>
+ <text><![CDATA[<key>${1}</key>]]></text>
<tag>key</tag>
<description>key</description>
</snippet>
- <snippet id="keys">
- <text><![CDATA[<keyseq><key>$1</key><key>$2</key></keyseq>]]></text>
- <tag>keys</tag>
- <description>keystroke</description>
+ <snippet id="keyseq">
+ <text><![CDATA[<keyseq type="${1:combo}">${2}</keyseq>]]></text>
+ <tag>keyseq</tag>
+ <description>keyseq</description>
+ </snippet>
+ <snippet id="license">
+ <text><![CDATA[<license href="${1}">
+ ${2}
+</license>]]></text>
+ <tag>license</tag>
+ <description>license</description>
</snippet>
<snippet id="link">
- <text><![CDATA[<link type="${1:[topic,guide,seealso,next]}" xref="${2:index}"/>]]></text>
+ <text><![CDATA[<link type="${1:guide}" xref="${2:index}" group="${3}"/>]]></text>
<tag>link</tag>
<description>link</description>
</snippet>
+ <snippet id="links">
+ <text><![CDATA[<links type="${1:topic}" groups="${2}">
+ ${3}
+</links>]]></text>
+ <tag>links</tag>
+ <description>links</description>
+ </snippet>
<snippet id="list">
- <text><![CDATA[<list>
- <title>${1:Title}</title>
- <item><p>${2}</p></item>
- <item><p>${3}</p></item>
+ <text><![CDATA[<list type="${1:disc}">
+ ${2}
</list>]]></text>
<tag>list</tag>
<description>list</description>
</snippet>
<snippet id="listing">
<text><![CDATA[<listing>
- <title>${1:Title}</title>
- <desc>${2:Short description.}</desc>
- <code><![CDATA[
-$0
-]]]]><![CDATA[></code>
+ ${1}
</listing>]]></text>
<tag>listing</tag>
<description>listing</description>
</snippet>
+ <snippet id="media">
+ <text><![CDATA[<media type="${1:image}" mime="${2:image/png}" src="${3}">
+ ${4}
+</media>]]></text>
+ <tag>media</tag>
+ <description>media</description>
+ </snippet>
+ <snippet id="name">
+ <text><![CDATA[<name>${1}</name>]]></text>
+ <tag>name</tag>
+ <description>name</description>
+ </snippet>
<snippet id="note">
- <text><![CDATA[<note style="${1:[advanced,bug,important,tip,warning]}">
- <p>
- $0
- </p>
+ <text><![CDATA[<note style="${1:advanced}">
+ ${2}
</note>]]></text>
<tag>note</tag>
<description>note</description>
</snippet>
- <snippet id="num">
- <text><![CDATA[<list type="numbered">
- <item><p>$1</p></item>
- <item><p>$2</p></item>
- <item><p>$3</p></item>
-</list>]]></text>
- <tag>num</tag>
- <description>numbered list</description>
+ <snippet id="output">
+ <text><![CDATA[<output>${1}</output>]]></text>
+ <tag>output</tag>
+ <description>output</description>
+ </snippet>
+ <snippet id="p">
+ <text><![CDATA[<p>${1}</p>]]></text>
+ <tag>p</tag>
+ <description>p</description>
</snippet>
<snippet id="page">
- <text><![CDATA[<page xmlns="http://projectmallard.org/1.0/"
- type="${1:[topic,guide,seealso,next]}" style="${2:task}"
- id="${3:id}">
-
-<info>
- <desc>${4:Short description}</desc>
- <revision pkgversion="${5:program_version}" version="${6:document_version}" date="$<7: import datetime as
d; return d.date.isoformat(d.date.today())>"
status="${8:[stub,incomplete,draft,outdated,review,candidate,final]}"/>
- <credit type="author">
- <name>$<9:
-import pwd, os
-try:
- return pwd.getpwuid(os.getuid()).pw_gecos.split(',')[0]
-except KeyError:
- return 'Joe Example' ></name>
- <email>$<10:
-import os
-return os.getenv('EMAIL', 'joe example com') ></email>
- </credit>
-</info>
-
-$0
-
+ <text><![CDATA[<page xmlns="http://projectmallard.org/1.0/" type="${1:topic}" id="${2}">
+ ${3}
</page>]]></text>
<tag>page</tag>
<description>page</description>
</snippet>
- <snippet id="/">
- <text><![CDATA[</p>]]></text>
- <tag>/</tag>
- <description>p close</description>
- </snippet>
- <snippet id="p">
- <text><![CDATA[<p>]]></text>
- <tag>p</tag>
- <description>p open</description>
- </snippet>
<snippet id="quote">
<text><![CDATA[<quote>
- <p>$0</p>
+ ${1}
</quote>]]></text>
<tag>quote</tag>
<description>quote</description>
</snippet>
+ <snippet id="revision">
+ <text><![CDATA[<revision version="${1:0.1}" date="$(2:date +%Y-%m-%d)" status="${3:stub}"/>]]></text>
+ <tag>revision</tag>
+ <description>revision</description>
+ </snippet>
+ <snippet id="screen">
+ <text><![CDATA[<screen>${1}</screen>]]></text>
+ <tag>screen</tag>
+ <description>screen</description>
+ </snippet>
<snippet id="section">
<text><![CDATA[<section id="${1}">
- <title>${2:Section Title}</title>
- <p>$0</p>
+ ${2}
</section>]]></text>
<tag>section</tag>
<description>section</description>
</snippet>
+ <snippet id="span">
+ <text><![CDATA[<span>${1}</span>]]></text>
+ <tag>span</tag>
+ <description>span</description>
+ </snippet>
<snippet id="steps">
<text><![CDATA[<steps>
- <item><p>$0</p></item>
+ ${1}
</steps>]]></text>
<tag>steps</tag>
<description>steps</description>
</snippet>
+ <snippet id="subtitle">
+ <text><![CDATA[<subtitle>${1}</subtitle>]]></text>
+ <tag>subtitle</tag>
+ <description>subtitle</description>
+ </snippet>
+ <snippet id="synopsis">
+ <text><![CDATA[<synopsis>
+ ${1}
+</synopsis>]]></text>
+ <tag>synopsis</tag>
+ <description>synopsis</description>
+ </snippet>
+ <snippet id="sys">
+ <text><![CDATA[<sys>${1}</sys>]]></text>
+ <tag>sys</tag>
+ <description>sys</description>
+ </snippet>
+ <snippet id="table">
+ <text><![CDATA[<table frame="${1:all}" rules="${2:all}" shade="${3:none}">
+ ${4}
+</table>]]></text>
+ <tag>table</tag>
+ <description>table</description>
+ </snippet>
+ <snippet id="tbody">
+ <text><![CDATA[<tbody>
+ ${1}
+</tbody>]]></text>
+ <tag>tbody</tag>
+ <description>tbody</description>
+ </snippet>
+ <snippet id="td">
+ <text><![CDATA[<td>${1}</td>]]></text>
+ <tag>td</tag>
+ <description>td</description>
+ </snippet>
<snippet id="terms">
<text><![CDATA[<terms>
- <title>${1:Title}</title>
- <item><p>$2</p></item>
+ ${1}
</terms>]]></text>
<tag>terms</tag>
<description>terms</description>
</snippet>
- <snippet id="tip">
- <text><![CDATA[<note style="tip">
- <p>$1</p>
-</note> ]]></text>
- <tag>tip</tag>
- <description>tip note</description>
+ <snippet id="tfoot">
+ <text><![CDATA[<tfoot>
+ ${1}
+</tfoot>]]></text>
+ <tag>tfoot</tag>
+ <description>tfoot</description>
+ </snippet>
+ <snippet id="thead">
+ <text><![CDATA[<thead>
+ ${1}
+</thead>]]></text>
+ <tag>thead</tag>
+ <description>thead</description>
</snippet>
<snippet id="title">
- <text><![CDATA[<title>${1:Title}</title>]]></text>
+ <text><![CDATA[<title>${1}</title>]]></text>
<tag>title</tag>
<description>title</description>
</snippet>
- <snippet id="warn">
- <text><![CDATA[<note style="warning">
- <p>$1</p>
-</note> ]]></text>
- <tag>warn</tag>
- <description>warning note</description>
- </snippet>
- <snippet id="elink">
- <text><![CDATA[<link href="http://${1:url}/">${2}</link>$0]]></text>
- <tag>elink</tag>
- <description>link</description>
+ <snippet id="tr">
+ <text><![CDATA[<tr>
+ ${1}
+</tr>]]></text>
+ <tag>tr</tag>
+ <description>tr</description>
+ </snippet>
+ <snippet id="tree">
+ <text><![CDATA[<tree>
+ ${1}
+</tree>]]></text>
+ <tag>tree</tag>
+ <description>tree</description>
+ </snippet>
+ <snippet id="var">
+ <text><![CDATA[<var>${1}</var>]]></text>
+ <tag>var</tag>
+ <description>var</description>
</snippet>
<snippet id="years">
- <text><![CDATA[<years>$<1: import datetime as d; return d.date.today().strftime('%Y')></years>]]></text>
+ <text><![CDATA[<years>$(1:date +%Y)</years>]]></text>
<tag>years</tag>
<description>years</description>
</snippet>
- <snippet id="sel href">
- <text><![CDATA[<link href="$1">${2:$GEDIT_SELECTED_TEXT}</link>]]></text>
- <accelerator><![CDATA[<Control>l]]></accelerator>
- <description>Wrap selection as link</description>
- </snippet>
- <snippet id="sel list">
- <text><![CDATA[<item><p>${1:$GEDIT_SELECTED_TEXT}</p></item>]]></text>
- <accelerator><![CDATA[<Control>t]]></accelerator>
- <description>Wrap selection as list item</description>
- </snippet>
</snippets>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]