]> code.delx.au - gnu-emacs-elpa/blob - doc/index.html
add html document to repo so that they can be linked directly from Google Code Homepage
[gnu-emacs-elpa] / doc / index.html
1 <?xml version="1.0" encoding="utf-8" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
7 <title>YASnippet - Yet Another Snippet extension for Emacs</title>
8 <meta name="author" content="pluskid" />
9 <meta name="date" content="2008-03-20" />
10 <style type="text/css">
11
12 /*
13 :Author: David Goodger
14 :Contact: goodger@users.sourceforge.net
15 :Date: $Date: 2005-12-18 01:56:14 +0100 (Sun, 18 Dec 2005) $
16 :Revision: $Revision: 4224 $
17 :Copyright: This stylesheet has been placed in the public domain.
18
19 Default cascading style sheet for the HTML output of Docutils.
20
21 See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
22 customize this style sheet.
23 */
24
25 /* used to remove borders from tables and images */
26 .borderless, table.borderless td, table.borderless th {
27 border: 0 }
28
29 table.borderless td, table.borderless th {
30 /* Override padding for "table.docutils td" with "! important".
31 The right padding separates the table cells. */
32 padding: 0 0.5em 0 0 ! important }
33
34 .first {
35 /* Override more specific margin styles with "! important". */
36 margin-top: 0 ! important }
37
38 .last, .with-subtitle {
39 margin-bottom: 0 ! important }
40
41 .hidden {
42 display: none }
43
44 a.toc-backref {
45 text-decoration: none ;
46 color: black }
47
48 blockquote.epigraph {
49 margin: 2em 5em ; }
50
51 dl.docutils dd {
52 margin-bottom: 0.5em }
53
54 /* Uncomment (and remove this text!) to get bold-faced definition list terms
55 dl.docutils dt {
56 font-weight: bold }
57 */
58
59 div.abstract {
60 margin: 2em 5em }
61
62 div.abstract p.topic-title {
63 font-weight: bold ;
64 text-align: center }
65
66 div.admonition, div.attention, div.caution, div.danger, div.error,
67 div.hint, div.important, div.note, div.tip, div.warning {
68 margin: 2em ;
69 border: medium outset ;
70 padding: 1em }
71
72 div.admonition p.admonition-title, div.hint p.admonition-title,
73 div.important p.admonition-title, div.note p.admonition-title,
74 div.tip p.admonition-title {
75 font-weight: bold ;
76 font-family: sans-serif }
77
78 div.attention p.admonition-title, div.caution p.admonition-title,
79 div.danger p.admonition-title, div.error p.admonition-title,
80 div.warning p.admonition-title {
81 color: red ;
82 font-weight: bold ;
83 font-family: sans-serif }
84
85 /* Uncomment (and remove this text!) to get reduced vertical space in
86 compound paragraphs.
87 div.compound .compound-first, div.compound .compound-middle {
88 margin-bottom: 0.5em }
89
90 div.compound .compound-last, div.compound .compound-middle {
91 margin-top: 0.5em }
92 */
93
94 div.dedication {
95 margin: 2em 5em ;
96 text-align: center ;
97 font-style: italic }
98
99 div.dedication p.topic-title {
100 font-weight: bold ;
101 font-style: normal }
102
103 div.figure {
104 margin-left: 2em ;
105 margin-right: 2em }
106
107 div.footer, div.header {
108 clear: both;
109 font-size: smaller }
110
111 div.line-block {
112 display: block ;
113 margin-top: 1em ;
114 margin-bottom: 1em }
115
116 div.line-block div.line-block {
117 margin-top: 0 ;
118 margin-bottom: 0 ;
119 margin-left: 1.5em }
120
121 div.sidebar {
122 margin-left: 1em ;
123 border: medium outset ;
124 padding: 1em ;
125 background-color: #ffffee ;
126 width: 40% ;
127 float: right ;
128 clear: right }
129
130 div.sidebar p.rubric {
131 font-family: sans-serif ;
132 font-size: medium }
133
134 div.system-messages {
135 margin: 5em }
136
137 div.system-messages h1 {
138 color: red }
139
140 div.system-message {
141 border: medium outset ;
142 padding: 1em }
143
144 div.system-message p.system-message-title {
145 color: red ;
146 font-weight: bold }
147
148 div.topic {
149 margin: 2em }
150
151 h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
152 h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
153 margin-top: 0.4em }
154
155 h1.title {
156 text-align: center }
157
158 h2.subtitle {
159 text-align: center }
160
161 hr.docutils {
162 width: 75% }
163
164 img.align-left {
165 clear: left }
166
167 img.align-right {
168 clear: right }
169
170 ol.simple, ul.simple {
171 margin-bottom: 1em }
172
173 ol.arabic {
174 list-style: decimal }
175
176 ol.loweralpha {
177 list-style: lower-alpha }
178
179 ol.upperalpha {
180 list-style: upper-alpha }
181
182 ol.lowerroman {
183 list-style: lower-roman }
184
185 ol.upperroman {
186 list-style: upper-roman }
187
188 p.attribution {
189 text-align: right ;
190 margin-left: 50% }
191
192 p.caption {
193 font-style: italic }
194
195 p.credits {
196 font-style: italic ;
197 font-size: smaller }
198
199 p.label {
200 white-space: nowrap }
201
202 p.rubric {
203 font-weight: bold ;
204 font-size: larger ;
205 color: maroon ;
206 text-align: center }
207
208 p.sidebar-title {
209 font-family: sans-serif ;
210 font-weight: bold ;
211 font-size: larger }
212
213 p.sidebar-subtitle {
214 font-family: sans-serif ;
215 font-weight: bold }
216
217 p.topic-title {
218 font-weight: bold }
219
220 pre.address {
221 margin-bottom: 0 ;
222 margin-top: 0 ;
223 font-family: serif ;
224 font-size: 100% }
225
226 pre.literal-block, pre.doctest-block {
227 margin-left: 2em ;
228 margin-right: 2em ;
229 background-color: #eeeeee }
230
231 span.classifier {
232 font-family: sans-serif ;
233 font-style: oblique }
234
235 span.classifier-delimiter {
236 font-family: sans-serif ;
237 font-weight: bold }
238
239 span.interpreted {
240 font-family: sans-serif }
241
242 span.option {
243 white-space: nowrap }
244
245 span.pre {
246 white-space: pre }
247
248 span.problematic {
249 color: red }
250
251 span.section-subtitle {
252 /* font-size relative to parent (h1..h6 element) */
253 font-size: 80% }
254
255 table.citation {
256 border-left: solid 1px gray;
257 margin-left: 1px }
258
259 table.docinfo {
260 margin: 2em 4em }
261
262 table.docutils {
263 margin-top: 0.5em ;
264 margin-bottom: 0.5em }
265
266 table.footnote {
267 border-left: solid 1px black;
268 margin-left: 1px }
269
270 table.docutils td, table.docutils th,
271 table.docinfo td, table.docinfo th {
272 padding-left: 0.5em ;
273 padding-right: 0.5em ;
274 vertical-align: top }
275
276 table.docutils th.field-name, table.docinfo th.docinfo-name {
277 font-weight: bold ;
278 text-align: left ;
279 white-space: nowrap ;
280 padding-left: 0 }
281
282 h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
283 h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
284 font-size: 100% }
285
286 tt.docutils {
287 background-color: #eeeeee }
288
289 ul.auto-toc {
290 list-style-type: none }
291
292 </style>
293 </head>
294 <body>
295 <div class="document" id="yasnippet-yet-another-snippet-extension-for-emacs">
296 <h1 class="title">YASnippet - Yet Another Snippet extension for Emacs</h1>
297 <table class="docinfo" frame="void" rules="none">
298 <col class="docinfo-name" />
299 <col class="docinfo-content" />
300 <tbody valign="top">
301 <tr><th class="docinfo-name">Author:</th>
302 <td>pluskid</td></tr>
303 <tr><th class="docinfo-name">Contact:</th>
304 <td><a class="first last reference" href="mailto:pluskid&#64;gmail.com">pluskid&#64;gmail.com</a></td></tr>
305 <tr><th class="docinfo-name">Date:</th>
306 <td>2008-03-20</td></tr>
307 </tbody>
308 </table>
309 <div class="contents topic">
310 <p class="topic-title first"><a id="contents" name="contents">Contents</a></p>
311 <ul class="simple">
312 <li><a class="reference" href="#getting-started" id="id5" name="id5">Getting Started</a><ul>
313 <li><a class="reference" href="#for-the-busy-or-impatient-people" id="id6" name="id6">For the busy or impatient people</a></li>
314 <li><a class="reference" href="#for-lazy-poeple-or-beginners" id="id7" name="id7">For lazy poeple or beginners</a></li>
315 <li><a class="reference" href="#for-you" id="id8" name="id8">For you</a></li>
316 <li><a class="reference" href="#for-geeks" id="id9" name="id9">For geeks</a></li>
317 </ul>
318 </li>
319 <li><a class="reference" href="#how-to-contribute" id="id10" name="id10">How to contribute ?</a><ul>
320 <li><a class="reference" href="#issues" id="id11" name="id11">Issues</a></li>
321 <li><a class="reference" href="#suggestion-feature-request" id="id12" name="id12">Suggestion, Feature Request</a></li>
322 <li><a class="reference" href="#snippets" id="id13" name="id13">Snippets</a></li>
323 </ul>
324 </li>
325 <li><a class="reference" href="#detailed-documentation" id="id14" name="id14">Detailed Documentation</a></li>
326 </ul>
327 </div>
328 <p>YASnippet is a re-design and re-write of my original extension
329 <a class="reference" href="http://code.google.com/p/smart-snippet/">smart-snippet</a>. It is much cleaner and more powerful than
330 smart-snippet.</p>
331 <div class="section">
332 <h1><a class="toc-backref" href="#id5" id="getting-started" name="getting-started">Getting Started</a></h1>
333 <div class="section">
334 <h2><a class="toc-backref" href="#id6" id="for-the-busy-or-impatient-people" name="for-the-busy-or-impatient-people">For the busy or impatient people</a></h2>
335 <p>Watch the <a class="reference" href="http://www.youtube.com/watch?v=vOj7btx3ATg">screencast at YouTube</a> or download <a class="reference" href="http://yasnippet.googlecode.com/files/yasnippet.avi">the one
336 with a higher resolution</a>.</p>
337 </div>
338 <div class="section">
339 <h2><a class="toc-backref" href="#id7" id="for-lazy-poeple-or-beginners" name="for-lazy-poeple-or-beginners">For lazy poeple or beginners</a></h2>
340 <ol class="arabic">
341 <li><p class="first">Download the latest bundle release <a class="footnote-reference" href="#id3" id="id1" name="id1">[1]</a> from the <a class="reference" href="http://code.google.com/p/yasnippet/downloads/list">downloads page</a>.</p>
342 </li>
343 <li><p class="first">Create a directory <tt class="docutils literal"><span class="pre">~/emacs/plugins</span></tt>.</p>
344 </li>
345 <li><p class="first">Unpack the downloaded bundle to that directory.</p>
346 </li>
347 <li><p class="first">Add the following code to your <tt class="docutils literal"><span class="pre">~/.emacs</span></tt> file:</p>
348 <div class="highlight"><pre>(<span style="color: #19177C">add-to-list</span> <span style="color: #19177C">&#39;load-path</span>
349 <span style="color: #BA2121">&quot;~/emacs/plugins&quot;</span>)
350 (<span style="color: #008000">require</span> <span style="color: #19177C">&#39;yasnippet-bundle</span>)
351 </pre></div>
352 </li>
353 </ol>
354 </div>
355 <div class="section">
356 <h2><a class="toc-backref" href="#id8" id="for-you" name="for-you">For you</a></h2>
357 <ol class="arabic">
358 <li><p class="first">Download the latest YASnippet release package <a class="footnote-reference" href="#id4" id="id2" name="id2">[2]</a> from the
359 <a class="reference" href="http://code.google.com/p/yasnippet/downloads/list">downloads page</a>.</p>
360 </li>
361 <li><p class="first">Unpack it to a directory and add that directory to your
362 <tt class="docutils literal"><span class="pre">load-path</span></tt>.</p>
363 </li>
364 <li><p class="first">Add the following code to your <tt class="docutils literal"><span class="pre">~/.emacs</span></tt> file:</p>
365 <div class="highlight"><pre>(<span style="color: #008000">require</span> <span style="color: #19177C">&#39;yasnippet</span>) <span style="color: #408080; font-style: italic">;; not yasnippet-bundle</span>
366 (<span style="color: #19177C">yas/initialize</span>)
367 (<span style="color: #19177C">yas/load-directory</span> <span style="color: #BA2121">&quot;/path/to/the/snippets/directory/&quot;</span>)
368 </pre></div>
369 </li>
370 <li><p class="first">You can inspect into the <tt class="docutils literal"><span class="pre">snippets</span></tt> directory for adding your own
371 snippets.</p>
372 </li>
373 <li><p class="first">Detailed document can be found at the <tt class="docutils literal"><span class="pre">doc</span></tt> directory.</p>
374 </li>
375 </ol>
376 </div>
377 <div class="section">
378 <h2><a class="toc-backref" href="#id9" id="for-geeks" name="for-geeks">For geeks</a></h2>
379 <p>If you want to always follow the latest code. You can check out it
380 from the svn repository:</p>
381 <div class="highlight"><pre>svn checkout http://yasnippet.googlecode.com/svn/trunk/ yasnippet
382 </pre></div>
383 <p>However, I try to release a new version as soon as I made some changes
384 that will affect the normal use or added some new features. So there's
385 usually no need to follow the svn repository. Except that you might
386 find <tt class="docutils literal"><span class="pre">svn</span> <span class="pre">up</span></tt> is more convenient than downloading and unpacking the
387 release package. :D</p>
388 </div>
389 </div>
390 <div class="section">
391 <h1><a class="toc-backref" href="#id10" id="how-to-contribute" name="how-to-contribute">How to contribute ?</a></h1>
392 <p>If you like YASnippet, you can recommendate it to your friends.</p>
393 <div class="section">
394 <h2><a class="toc-backref" href="#id11" id="issues" name="issues">Issues</a></h2>
395 <p>If you find a bug you can create a new issue at the <a class="reference" href="http://code.google.com/p/yasnippet/issues/list">issue list</a>. Please describe
396 the problem as clear as possible.</p>
397 </div>
398 <div class="section">
399 <h2><a class="toc-backref" href="#id12" id="suggestion-feature-request" name="suggestion-feature-request">Suggestion, Feature Request</a></h2>
400 <p>There's a <a class="reference" href="http://groups.google.com/group/smart-snippet">discussion group</a> for both smart-snippet and yasnippet. If
401 you have any suggesion, you can post to there and discuss with other
402 members.</p>
403 <p>Especially, there's a <a class="reference" href="http://code.google.com/p/yasnippet/wiki/WishList">wish list</a> wiki page. I'll collect ideas from
404 the <a class="reference" href="http://groups.google.com/group/smart-snippet">discussion group</a> to the <a class="reference" href="http://code.google.com/p/yasnippet/wiki/WishList">wish list</a>. So you might want to look
405 at the <a class="reference" href="http://code.google.com/p/yasnippet/wiki/WishList">wish list</a> before you post something.</p>
406 </div>
407 <div class="section">
408 <h2><a class="toc-backref" href="#id13" id="snippets" name="snippets">Snippets</a></h2>
409 <p>YASnippet comes with some default snippet definitions. However, they
410 are far from complete. So I'm calling users to share their
411 snippets. If you have some good snippet definitions, you can post them
412 to the <a class="reference" href="http://groups.google.com/group/smart-snippet">discussion group</a>. You can specify the <tt class="docutils literal"><span class="pre">contributor</span></tt>
413 property of the snippet like:</p>
414 <div class="highlight"><pre>#contributor : pluskid &lt;pluskid@gmail.com&gt;
415 #name : __...__
416 # --
417 __${init}__
418 </pre></div>
419 <p>I'll incorporate (some of) them in the release if suitable. However,
420 if you have <em>many</em> snippets (especially when they need to be
421 maintained and updated constantly), it is not suitable to put them in
422 the YASnippet release package. A better way is to make your snippets
423 publicly available and tell me the URL. I'll try to keep a list of
424 them on the wiki page.</p>
425 </div>
426 </div>
427 <div class="section">
428 <h1><a class="toc-backref" href="#id14" id="detailed-documentation" name="detailed-documentation">Detailed Documentation</a></h1>
429 <ul class="simple">
430 <li>See <a class="reference" href="define_snippet.html">this page</a> on how to define a snippet by
431 yourself.</li>
432 <li>Here's the <a class="reference" href="faq.html">FAQ</a> page.</li>
433 </ul>
434 <table class="docutils footnote" frame="void" id="id3" rules="none">
435 <colgroup><col class="label" /><col /></colgroup>
436 <tbody valign="top">
437 <tr><td class="label"><a class="fn-backref" href="#id1" name="id3">[1]</a></td><td>They usually named like <tt class="docutils literal"><span class="pre">yasnippet-bundle-x.y.z.el.tgz</span></tt> where
438 <tt class="docutils literal"><span class="pre">x.y.z</span></tt> is the version number.</td></tr>
439 </tbody>
440 </table>
441 <table class="docutils footnote" frame="void" id="id4" rules="none">
442 <colgroup><col class="label" /><col /></colgroup>
443 <tbody valign="top">
444 <tr><td class="label"><a class="fn-backref" href="#id2" name="id4">[2]</a></td><td>They usually named like <tt class="docutils literal"><span class="pre">yasnippet.x.y.z.tar.bz2</span></tt>.</td></tr>
445 </tbody>
446 </table>
447 </div>
448 </div>
449 </body>
450 </html>