mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
Automatic documentation update.
This commit is contained in:
parent
9541850df9
commit
15f3e4febf
260
index.html
260
index.html
@ -1,77 +1,201 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
|
||||
<title>capitaomorte/yasnippet @ GitHub</title>
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
margin-top: 1.0em;
|
||||
background-color: #89968b;
|
||||
font-family: Helvetica, Arial, FreeSans, san-serif;
|
||||
color: #000000;
|
||||
}
|
||||
#container {
|
||||
margin: 0 auto;
|
||||
width: 700px;
|
||||
}
|
||||
h1 { font-size: 3.8em; color: #766974; margin-bottom: 3px; }
|
||||
h1 .small { font-size: 0.4em; }
|
||||
h1 a { text-decoration: none }
|
||||
h2 { font-size: 1.5em; color: #766974; }
|
||||
h3 { text-align: center; color: #766974; }
|
||||
a { color: #766974; }
|
||||
.description { font-size: 1.2em; margin-bottom: 30px; margin-top: 30px; font-style: italic;}
|
||||
.download { float: right; }
|
||||
pre { background: #000; color: #fff; padding: 15px;}
|
||||
hr { border: 0; width: 80%; border-bottom: 1px solid #aaa}
|
||||
.footer { text-align:center; padding-top:30px; font-style: italic; }
|
||||
</style>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.8.1: http://docutils.sourceforge.net/" />
|
||||
<title>Yet Another Snippet extension</title>
|
||||
<link rel="stylesheet" href="styles.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a href="http://github.com/capitaomorte/yasnippet"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div class="download">
|
||||
<a href="http://github.com/capitaomorte/yasnippet/zipball/master">
|
||||
<img border="0" width="90" src="http://github.com/images/modules/download/zip.png"></a>
|
||||
<a href="http://github.com/capitaomorte/yasnippet/tarball/master">
|
||||
<img border="0" width="90" src="http://github.com/images/modules/download/tar.png"></a>
|
||||
<div class="document" id="yet-another-snippet-extension">
|
||||
<div id="header-region" class="clear-block"></div>
|
||||
<div id="wrapper">
|
||||
<div id="container" class="clear-block">
|
||||
<div id="header">
|
||||
<div id="logo-floater">
|
||||
<h1 class="title">Yet Another Snippet extension</h1>
|
||||
</div>
|
||||
|
||||
<h1><a href="http://github.com/capitaomorte/yasnippet">yasnippet</a>
|
||||
<span class="small">by <a href="http://github.com/capitaomorte">capitaomorte</a></span></h1>
|
||||
|
||||
<div class="description">
|
||||
Official yasnippet repository
|
||||
<ul class="primary-links">
|
||||
<li>
|
||||
<a title="" href="index.html">Intro and tutorial</a>
|
||||
</li>
|
||||
<li>
|
||||
<a title="" href="snippet-organization.html">Howto: organize</a>
|
||||
</li>
|
||||
<li>
|
||||
<a title="" href="snippet-expansion.html">Howto: expand</a>
|
||||
</li>
|
||||
<li>
|
||||
<a title="" href="snippet-development.html">Howto: write </a>
|
||||
</li>
|
||||
<li>
|
||||
<a title="" href="snippet-menu.html">Howto: menu </a>
|
||||
</li>
|
||||
<li>
|
||||
<a title="" href="faq.html">FAQ</a>
|
||||
</li>
|
||||
<li>
|
||||
<a title="" href="changelog.html">ChangeLog</a>
|
||||
</li>
|
||||
<li>
|
||||
<a title="" href="http://code.google.com/p/yasnippet/downloads/list">Download</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h2>Authors</h2>
|
||||
<p>João Távora (joaotavora@gmail.com)
<br/>Zhang Chiyuan (pluskid@gmail.com)
<br/>Rob Christie (robchristie@gmail.com)
<br/>Xah Lee (xahlee@gmail.com)
<br/>
<br/> </p>
|
||||
<h2>Contact</h2>
|
||||
<p>João Távora (joaotavora@gmail.com)
<br/> </p>
|
||||
|
||||
|
||||
<h2>Download</h2>
|
||||
<p>
|
||||
You can download this project in either
|
||||
<a href="http://github.com/capitaomorte/yasnippet/zipball/master">zip</a> or
|
||||
<a href="http://github.com/capitaomorte/yasnippet/tarball/master">tar</a> formats.
|
||||
</p>
|
||||
<p>You can also clone the project with <a href="http://git-scm.com">Git</a>
|
||||
by running:
|
||||
<pre>$ git clone git://github.com/capitaomorte/yasnippet</pre>
|
||||
</p>
|
||||
|
||||
<div class="footer">
|
||||
get the source code on GitHub : <a href="http://github.com/capitaomorte/yasnippet">capitaomorte/yasnippet</a>
|
||||
<div id="center">
|
||||
<div id="squeeze">
|
||||
<div class="right-corner">
|
||||
<div class="left-corner">
|
||||
<p>
|
||||
<b>Important:</b> This documentation applies to
|
||||
the <b>SVN trunk</b> of YASnippet, which you
|
||||
get <a href="http://code.google.com/p/yasnippet/source/checkout">here</a>. Documentation
|
||||
for other versions can be found <a title=""
|
||||
href="http://code.google.com/p/yasnippet/downloads/list">here</a>.
|
||||
</p>
|
||||
<div class="contents topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#video-demo" id="id1">Video Demo</a></li>
|
||||
<li><a class="reference internal" href="#installation" id="id2">Installation</a><ul>
|
||||
<li><a class="reference internal" href="#install-with-yasnippet-bundle-el" id="id3">Install with <tt class="docutils literal"><span class="pre">yasnippet-bundle.el</span></tt></a></li>
|
||||
<li><a class="reference internal" href="#normal-install" id="id4">Normal Install</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#how-to-use-yasnippet" id="id5">How to use YASnippet</a></li>
|
||||
<li><a class="reference internal" href="#bugs-contribution-and-support" id="id6">Bugs, Contribution and Support</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<p><strong>YASnippet</strong> is a template system for Emacs. It allows you to type an
|
||||
abbreviation and automatically expand it into function
|
||||
templates. Bundled language templates includes: C, C++, C#, Perl,
|
||||
Python, Ruby, SQL, LaTeX, HTML, CSS and more.</p>
|
||||
<p>The snippet syntax is inspired from TextMate's syntax, you can even
|
||||
<a class="reference external" href="snippet-development.html#importing-textmate-snippets">import</a>
|
||||
import most TextMate templates. YASnippet is a re-write of the
|
||||
extension <a class="reference external" href="http://code.google.com/p/smart-snippet/">smart-snippet</a>. Both are original creations of <a class="reference external" href="http://pluskid.lifegoo.org">pluskid</a>.</p>
|
||||
<div class="section" id="video-demo">
|
||||
<h1><a class="toc-backref" href="#id1">Video Demo</a></h1>
|
||||
<object type="application/x-shockwave-flash"
|
||||
width="425"
|
||||
height="344"
|
||||
align="right"
|
||||
class="youtube-embed"
|
||||
data="http://www.youtube.com/v/76Ygeg9miao">
|
||||
<param name="movie" value="http://www.youtube.com/v/76Ygeg9miao"></param>
|
||||
<param name="wmode" value="transparent"></param>
|
||||
</object>
|
||||
<p>Watch the <a class="reference external" href="http://www.youtube.com/watch?v=76Ygeg9miao">demo at YouTube</a> (download a higher
|
||||
resolution version: <a class="reference external" href="http://yasnippet.googlecode.com/files/yasnippet.avi">yasnippet.avi</a>).</p>
|
||||
</div>
|
||||
<div class="section" id="installation">
|
||||
<h1><a class="toc-backref" href="#id2">Installation</a></h1>
|
||||
<p>There are two archives you can download. To quickly tryout YASnippet,
|
||||
download the simpler "bundle" version. If you plan to modify the
|
||||
bundled templates and/or build your own, download the "normal"
|
||||
package.</p>
|
||||
<div class="section" id="install-with-yasnippet-bundle-el">
|
||||
<h2><a class="toc-backref" href="#id3">Install with <tt class="docutils literal"><span class="pre">yasnippet-bundle.el</span></tt></a></h2>
|
||||
<ol class="arabic simple">
|
||||
<li>Download the latest <tt class="docutils literal"><span class="pre">yasnippet-bundle-x.y.z.el.tgz</span></tt> and unpack it.</li>
|
||||
<li>You'll get a file named <tt class="docutils literal"><span class="pre">yasnippet-bundle.el</span></tt>, put it under
|
||||
<tt class="docutils literal"><span class="pre">~/.emacs.d/plugins/</span></tt> (create the directory if not exists).</li>
|
||||
<li>Open the file in Emacs, and type <tt class="docutils literal">Alt+x <span class="pre">eval-buffer</span></tt>.</li>
|
||||
</ol>
|
||||
<p>That's it. Now open any one of your language file, you'll see a menu
|
||||
YASnippet. you can pull the menu to insert a template. Or, you can
|
||||
type the a <em>trigger key</em> then press <tt class="docutils literal">TAB</tt> to expand it.</p>
|
||||
<p>To have Emacs load YASnippet automatically when it starts, put the
|
||||
following in your <tt class="docutils literal"><span class="pre">~/.emacs</span></tt> file:</p>
|
||||
<blockquote>
|
||||
<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">(<span style="color: #19177C">add-to-list</span> <span style="color: #19177C">'load-path</span>
|
||||
<span style="color: #BA2121">"~/.emacs.d/plugins"</span>)
|
||||
(<span style="color: #008000">require</span> <span style="color: #19177C">'yasnippet-bundle</span>)
|
||||
</pre></div>
|
||||
</blockquote>
|
||||
<p>The <a class="reference external" href="http://www.youtube.com/watch?v=76Ygeg9miao">youtube video</a>
|
||||
demonstrates this quick installation.</p>
|
||||
</div>
|
||||
<div class="section" id="normal-install">
|
||||
<h2><a class="toc-backref" href="#id4">Normal Install</a></h2>
|
||||
<p>To install YASnippet as a normal emacs package, download and unpack
|
||||
the latest <tt class="docutils literal"><span class="pre">yasnippet-x.y.z.tar.bz2</span></tt>. You'll get a directory named
|
||||
<tt class="docutils literal"><span class="pre">yasnippet-x.y.z</span></tt>, which you can put it in your
|
||||
<tt class="docutils literal"><span class="pre">~/.emacs.d/plugins</span></tt> and add the following in your <tt class="docutils literal">.emacs</tt> file:</p>
|
||||
<blockquote>
|
||||
<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">(<span style="color: #19177C">add-to-list</span> <span style="color: #19177C">'load-path</span>
|
||||
<span style="color: #BA2121">"~/.emacs.d/plugins/yasnippet-x.y.z"</span>)
|
||||
(<span style="color: #008000">require</span> <span style="color: #19177C">'yasnippet</span>) <span style="color: #408080; font-style: italic">;; not yasnippet-bundle</span>
|
||||
(<span style="color: #19177C">yas/initialize</span>)
|
||||
(<span style="color: #19177C">yas/load-directory</span> <span style="color: #BA2121">"~/.emacs.d/plugins/yasnippet-x.y.z/snippets"</span>)
|
||||
</pre></div>
|
||||
</blockquote>
|
||||
<p>Please refer to the documentation for full customization, or use the
|
||||
customization group.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="how-to-use-yasnippet">
|
||||
<h1><a class="toc-backref" href="#id5">How to use YASnippet</a></h1>
|
||||
<p>Since version 0.6, YASnippet contains more functionality. You don't
|
||||
need to know all of it to use it successfully, but you it can improve
|
||||
your snippeting experience.</p>
|
||||
<p>Hence this section has been split into separate documents:</p>
|
||||
<ol class="arabic simple">
|
||||
<li><a class="reference external" href="snippet-organization.html">Organizing Snippets</a></li>
|
||||
</ol>
|
||||
<blockquote>
|
||||
Describes ways to organize your snippets in the hard disk (or not
|
||||
organize them at all and just use <tt class="docutils literal"><span class="pre">yasnippet-bundle.el</span></tt>.</blockquote>
|
||||
<ol class="arabic simple" start="2">
|
||||
<li><a class="reference external" href="snippet-expansion.html">Expanding Snippets</a></li>
|
||||
</ol>
|
||||
<blockquote>
|
||||
<p>Describes how YASnippet chooses snippets for expansion at point.</p>
|
||||
<p>Maybe, you'll want some snippets to be expanded in a particular
|
||||
mode, or only under certain conditions, or be prompted using
|
||||
<tt class="docutils literal">ido</tt>, etc...</p>
|
||||
</blockquote>
|
||||
<ol class="arabic simple" start="3">
|
||||
<li><a class="reference external" href="snippet-development.html">Writing Snippets</a></li>
|
||||
</ol>
|
||||
<blockquote>
|
||||
Describes the YASnippet definition syntax, which is very close (but
|
||||
not equivalent) to Textmate's. Includes a section about converting
|
||||
TextMate snippets.</blockquote>
|
||||
<ol class="arabic simple" start="4">
|
||||
<li><a class="reference external" href="snippet-menu.html">The YASnippet menu</a></li>
|
||||
</ol>
|
||||
<blockquote>
|
||||
Explains how to use the YASnippet menu to explore, learn and modify
|
||||
snippets.</blockquote>
|
||||
</div>
|
||||
<div class="section" id="bugs-contribution-and-support">
|
||||
<h1><a class="toc-backref" href="#id6">Bugs, Contribution and Support</a></h1>
|
||||
<ul class="simple">
|
||||
<li>If you find a bug, please report it at <a class="reference external" href="http://code.google.com/p/yasnippet/issues/list">Issue List</a>.</li>
|
||||
<li>If you have problem using YASnippet, or have some new ideas,
|
||||
including snippets, please post to the <a class="reference external" href="http://groups.google.com/group/smart-snippet">discussion group</a>.</li>
|
||||
</ul>
|
||||
<p>Thank you very much for using YASnippet!</p>
|
||||
<!-- LocalWords: YASnippet SQL LaTeX CSS yasnippet el eval html ido RET wiki -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
try {
|
||||
var pageTracker = _gat._getTracker("UA-10536822-1");
|
||||
pageTracker._trackPageview();
|
||||
} catch(err) {}
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user