doc almost complete. Drawing closer to 0.6.1b

This commit is contained in:
capitaomorte
2009-08-23 19:52:33 +00:00
parent 5b8671f8c3
commit 6c88b24bf8
27 changed files with 1806 additions and 988 deletions

View File

@@ -2,42 +2,47 @@
Yet Another Snippet extension
=============================
:Author: pluskid
:Contact: pluskid@gmail.com
:Date: 2008-03-20
.. _Organizing Snippets: snippet-organization.html
.. _Expanding Snippets: snippet-expansion.html
.. _Writing Snippets: snippet-development.html
.. _The YASnippet Menu: snippet-menu.html
.. contents::
Yasnippet is a template system for emacs. It allows you to type a
abbrevation and automatically expand the abbreviation into function
YASnippet is a template system for Emacs. It allows you to type a
abbreviation and automatically expand the abbreviation into function
templates.
Bundled language templates includes: C, C++, C#, Perl, Python, Ruby,
SQL, LaTeX, HTML, CSS and more.
Yasnippet system is inspired from TextMate's template system. You can
YASnippet system is inspired from TextMate's template system. You can
use `a tool
<https://groups.google.com/group/smart-snippet/browse_thread/thread/691fbdd33412d86e?pli=1>`_
to import any TextMate template you have to Yasnippet. It is a
re-design and re-write of my original extension `smart-snippet`_. It
is much cleaner and more powerful than smart-snippet.
<http://yasnippet.googlecode.com/svn/trunk/textmate-import.rb> to
import most TextMate templates to YASnippet.
YASnippet is a re-write of the extension `smart-snippet`_. Both are
original creations of `pluskid <http://pluskid.lifegoo.org>`_.
.. _smart-snippet: http://code.google.com/p/smart-snippet/
Video Demo
==========
.. youtube:: vOj7btx3ATg
:align: right
Watch the `demo at YouTube
<http://www.youtube.com/watch?v=vOj7btx3ATg>`_ (download a higher
resolution version: `yasnippet.avi
<http://yasnippet.googlecode.com/files/yasnippet.avi>`_).
Brief Install Instruction
=========================
Installation
============
There are two archives of YASnippet. One is a single file compiled
“bundle”, and the other is normal. If all you need is to use the
builtin templates, download the bundle one. If you want to add your
built-in templates, download the bundle one. If you want to add your
own templates, download the normal one.
Bundle Install
@@ -52,7 +57,7 @@ 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 pre-defined abbrev and press ``TAB`` to expand it.
To have emacs load YASnippet automatically when it starts, put the
To have Emacs load YASnippet automatically when it starts, put the
following in your ``~/.emacs`` file:
.. sourcecode:: common-lisp
@@ -80,71 +85,50 @@ following in your ``.emacs`` file:
Please refer to the documentation for full customization, or use the
customization group.
.. image:: images/customization-group.png
:align: right
How to use YASnippet
====================
Since version 0.6, YASnippet contains more functionality. You don't
need to know all of it to use it sucessfully, but you it can improve
need to know all of it to use it successfully, but you it can improve
your snippeting experience.
Hence this section has been split into separate documents:
1. `Organizing snippets <snippet-organization.html>`_
1. `Organizing Snippets`_
Describes ways to organize your snippets in the hard disk, or not
organize them at all and just use plain old elisp.
Describes ways to organize your snippets in the hard disk (or not
organize them at all and just use ``yasnippet-bundle.el``.
Also explains how to use the YASnippet menu to explore and learn new
snippets.
2. `Expanding Snippets`_
2. `Controlling snippet expansion <snippet-expansion.html>`_
Describes how YASnippet chooses snippets for expansion at point.
Maybe, you'll want some snippets to be expanded in a particular mode,
or only under certain conditions. Also you might want snippets to wrap
themselves around a region of selected text, use a direct keybinding,
control indenting, etc...
Maybe, you'll want some snippets to be expanded in a particular
mode, or only under certain conditions, or be prompted using
``ido``, etc...
3. `Defining your own snippets <snippet-development.html>`_
3. `Writing Snippets`_
Describes the YASnippet definition syntax, which is similar, but not
equivalent to Textmate's. Includes a section about converting Textmate
snippets.
Describes the YASnippet definition syntax, which is very close (but
not equivalent) to Textmate's. Includes a section about converting
TextMate snippets.
Customization group
===================
4. `The YASnippet menu`_
From version 0.6 onwards, there is a customization group that you can
access with:
``M-x customize-group RET yasnippet RET``
Each customization variable affects how some part of YASnippet works,
for example automatic snippet indentation, what prompting method to
use, whether to expand snippets inside snippets, etc...
Inside the customization group, each variable is reasonably documented
to explain what it does.
Explains how to use the YASnippet menu to explore and learn new
snippets.
Bugs, Contribution and Support
==============================
* If you find a bug, please report it at `Issue List
<http://code.google.com/p/yasnippet/issues/list>`_.
* If you have problem using YASnippet, or have some new ideas, please
post to the `discussion group`_. Especially, there's a `wish list`_
wiki page. I'll collect ideas from the `discussion group`_ to the
`wish list`_. So you might want to look at the `wish list`_ before
you post something.
* If you want to contribute some snippets, you can also post them to
the `discussion group`_. Some common snippets may be added to
YASnippet, while others will be collected at the
`UserContributedSnippets wiki page
<http://code.google.com/p/yasnippet/wiki/UserContributedSnippets>`_.
* If you have problem using YASnippet, or have some new ideas,
including snippets, please post to the `discussion group`_.
.. _discussion group: http://groups.google.com/group/smart-snippet
.. _wish list: http://code.google.com/p/yasnippet/wiki/WishList
Thank you very much for using YASnippet!
.. LocalWords: YASnippet SQL LaTeX CSS yasnippet el eval html ido RET wiki