From 36455f570d441a835efa46bc70188bd621abd541 Mon Sep 17 00:00:00 2001 From: Zhang Chiyuan Date: Wed, 28 Jan 2009 11:32:20 +0000 Subject: [PATCH] Updated the introduction doc, thanks Xah Lee for contributing this description --- doc/index.html | 175 ++++++++++++++++--------------------------------- doc/index.rst | 156 ++++++++++++++++--------------------------- 2 files changed, 115 insertions(+), 216 deletions(-) diff --git a/doc/index.html b/doc/index.html index 4991a72..d5ffcff 100644 --- a/doc/index.html +++ b/doc/index.html @@ -43,142 +43,83 @@

Contents

-

YASnippet is a re-design and re-write of my original extension +

Yasnippet is a template system for emacs. It allows you to type a +abbrevation 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 +use a tool 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.

-
-

Getting Started

-
-

For the busy or impatient people

-

Watch the screencast at YouTube or download the one -with a higher resolution.

+
+

Video Demo

+

Watch the demo at YouTube (download a higher +resolution version: yasnippet.avi).

-
-

For lazy poeple or beginners

-
    -
  1. Download the latest bundle release [1] from the downloads page.

    -
  2. -
  3. Create a directory ~/emacs/plugins.

    -
  4. -
  5. Unpack the downloaded bundle to that directory.

    -
  6. -
  7. Add the following code to your ~/.emacs file:

    +
    +

    Brief Install Instruction

    +

    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 +own templates, download the normal one.

    +
    +

    Bundle Install

    +
      +
    • Download the latest yasnippet-bundle-x.y.z.el.tgz and unpack it.
    • +
    • Open the file, and type Alt+x eval-buffer.
    • +
    +

    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 +following in your .emacs file:

    +
    (add-to-list 'load-path
    -              "~/emacs/plugins")
    +              "/path/to/dir/containing/bundle/file")
     (require 'yasnippet-bundle)
     
    -
  8. -
+
-
-

For you

-
    -
  1. Download the latest YASnippet release package [2] from the -downloads page.

    -
  2. -
  3. Unpack it to a directory and add that directory to your -load-path.

    -
  4. -
  5. Add the following code to your ~/.emacs file:

    +
    +

    Normal Install

    +

    For full install of the normal archive, just download and unpack the +latest yasnippet-x.y.z.tar.bz2, put it in your load-path and +add the following in your .emacs file:

    +
    (require 'yasnippet) ;; not yasnippet-bundle
     (yas/initialize)
     (yas/load-directory "/path/to/the/snippets/directory/")
     
    -
  6. -
  7. You can inspect into the snippets directory for adding your own -snippets.

    -
  8. -
  9. Detailed document can be found at the doc directory.

    -
  10. -
-
-
-

For geeks

-

If you want to always follow the latest code. You can check out it -from the svn repository:

-
svn checkout http://yasnippet.googlecode.com/svn/trunk/ yasnippet
-
-

However, I try to release a new version as soon as I made some changes -that will affect the normal use or added some new features. So there's -usually no need to follow the svn repository. Except that you might -find svn up is more convenient than downloading and unpacking the -release package. :D

+ +

Please refer to the documentation for full customization.

-
-

How to contribute ?

-

If you like YASnippet, you can recommendate it to your friends.

-
-

Issues

-

If you find a bug you can create a new issue at the issue list. Please describe -the problem as clear as possible.

-
-
-

Suggestion, Feature Request

-

There's a discussion group for both smart-snippet and yasnippet. If -you have any suggesion, you can post to there and discuss with other -members.

-

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.

-
-
-

Snippets

-

YASnippet comes with some default snippet definitions. However, they -are far from complete. So I'm calling users to share their -snippets. If you have some good snippet definitions, you can post them -to the discussion group. You can specify the contributor -property of the snippet like:

-
#contributor : pluskid <pluskid@gmail.com>
-#name : __...__
-# --
-__${init}__
-
-

I'll incorporate (some of) them in the release if suitable. However, -if you have many snippets (especially when they need to be -maintained and updated constantly), it is not suitable to put them in -the YASnippet release package. A better way is to make your snippets -publicly available and tell me the URL. I'll try to keep a list of -them on the wiki page.

-
-
-
-

Detailed Documentation

+
+

Bugs, Contribution and Support

- - - - - -
[1]They usually named like yasnippet-bundle-x.y.z.el.tgz where -x.y.z is the version number.
- - - - - -
[2]They usually named like yasnippet.x.y.z.tar.bz2.
+

Thank you very much for using YASnippet!

diff --git a/doc/index.rst b/doc/index.rst index 74aebdc..dde7a2a 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -8,47 +8,63 @@ Yet Another Snippet extension .. contents:: -YASnippet is a re-design and re-write of my original extension +Yasnippet is a template system for emacs. It allows you to type a +abbrevation 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 +use a tool 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. .. _smart-snippet: http://code.google.com/p/smart-snippet/ -Getting Started -=============== -For the busy or impatient people --------------------------------- +Video Demo +========== -Watch the `screencast at YouTube -`_ or download `the one -with a higher resolution -`_. +Watch the `demo at YouTube +`_ (download a higher +resolution version: `yasnippet.avi +`_). -For lazy poeple or beginners ----------------------------- +Brief Install Instruction +========================= -.. _downloads page: http://code.google.com/p/yasnippet/downloads/list +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 +own templates, download the normal one. + +Bundle Install +-------------- + +* Download the latest ``yasnippet-bundle-x.y.z.el.tgz`` and unpack it. +* Open the file, and type ``Alt+x eval-buffer``. + +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 +following in your ``.emacs`` file: -1. Download the latest bundle release [1]_ from the `downloads page`_. -2. Create a directory ``~/emacs/plugins``. -3. Unpack the downloaded bundle to that directory. -4. Add the following code to your ``~/.emacs`` file: - .. sourcecode:: common-lisp (add-to-list 'load-path - "~/emacs/plugins") + "/path/to/dir/containing/bundle/file") (require 'yasnippet-bundle) -For you -------- +Normal Install +-------------- -1. Download the latest YASnippet release package [2]_ from the - `downloads page`_. -2. Unpack it to a directory and add that directory to your - ``load-path``. -3. Add the following code to your ``~/.emacs`` file: +For full install of the normal archive, just download and unpack the +latest ``yasnippet-x.y.z.tar.bz2``, put it in your ``load-path`` and +add the following in your ``.emacs`` file: .. sourcecode:: common-lisp @@ -56,83 +72,25 @@ For you (yas/initialize) (yas/load-directory "/path/to/the/snippets/directory/") -4. You can inspect into the ``snippets`` directory for adding your own - snippets. -5. Detailed document can be found at the ``doc`` directory. +Please refer to the documentation for full customization. -For geeks ---------- +Bugs, Contribution and Support +============================== -If you want to always follow the latest code. You can check out it -from the svn repository: - -.. sourcecode:: bash - - svn checkout http://yasnippet.googlecode.com/svn/trunk/ yasnippet - -However, I try to release a new version as soon as I made some changes -that will affect the normal use or added some new features. So there's -usually no need to follow the svn repository. Except that you might -find ``svn up`` is more convenient than downloading and unpacking the -release package. :D - -How to contribute ? -=================== - -If you like YASnippet, you can recommendate it to your friends. - -Issues ------- - -If you find a bug you can create a new issue at the `issue list -`_. Please describe -the problem as clear as possible. - -Suggestion, Feature Request ---------------------------- - -There's a `discussion group`_ for both smart-snippet and yasnippet. If -you have any suggesion, you can post to there and discuss with other -members. - -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. - -Snippets --------- - -YASnippet comes with some default snippet definitions. However, they -are far from complete. So I'm calling users to share their -snippets. If you have some good snippet definitions, you can post them -to the `discussion group`_. You can specify the ``contributor`` -property of the snippet like: - -.. sourcecode:: text - - #contributor : pluskid - #name : __...__ - # -- - __${init}__ - -I'll incorporate (some of) them in the release if suitable. However, -if you have *many* snippets (especially when they need to be -maintained and updated constantly), it is not suitable to put them in -the YASnippet release package. A better way is to make your snippets -publicly available and tell me the URL. I'll try to keep a list of -them on the wiki page. +* If you find a bug, please report it at `Issue 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 + `_. .. _discussion group: http://groups.google.com/group/smart-snippet .. _wish list: http://code.google.com/p/yasnippet/wiki/WishList -Detailed Documentation -====================== - -* See `this page `_ on how to define a snippet by - yourself. -* Here's the `FAQ `_ page. -* Here's the `ChangeLog `_. - -.. [1] They usually named like ``yasnippet-bundle-x.y.z.el.tgz`` where - ``x.y.z`` is the version number. -.. [2] They usually named like ``yasnippet.x.y.z.tar.bz2``. +Thank you very much for using YASnippet!