From 7a6bb0f05e349068b0a89514f1da33d6d7de30a9 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Tue, 24 Apr 2012 23:29:38 +0200 Subject: emacs.d/lisp/yasnippet: added yasnippet --- emacs.d/lisp/yasnippet/doc/index.html | 201 ++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 emacs.d/lisp/yasnippet/doc/index.html (limited to 'emacs.d/lisp/yasnippet/doc/index.html') diff --git a/emacs.d/lisp/yasnippet/doc/index.html b/emacs.d/lisp/yasnippet/doc/index.html new file mode 100644 index 0000000..4f02a7e --- /dev/null +++ b/emacs.d/lisp/yasnippet/doc/index.html @@ -0,0 +1,201 @@ + + + + + + +Yet Another Snippet extension + + + +
+
+
+
+ +
+
+
+
+

+ Important: This documentation applies to + the SVN trunk of YASnippet, which you + get here. Documentation + for other versions can be found here. +

+ +

YASnippet 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.

+

The snippet syntax is inspired from TextMate's syntax, you can even +import +import most TextMate templates. YASnippet is a re-write of the +extension smart-snippet. Both are original creations of pluskid.

+
+

Video Demo

+ + + + +

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

+
+
+

Installation

+

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.

+
+

Install with yasnippet-bundle.el

+
    +
  1. Download the latest yasnippet-bundle-x.y.z.el.tgz and unpack it.
  2. +
  3. You'll get a file named yasnippet-bundle.el, put it under +~/.emacs.d/plugins/ (create the directory if not exists).
  4. +
  5. Open the file in Emacs, and type Alt+x eval-buffer.
  6. +
+

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 trigger key then 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.d/plugins")
+(require 'yasnippet-bundle)
+
+
+

The youtube video +demonstrates this quick installation.

+
+
+

Normal Install

+

To install YASnippet as a normal emacs package, download and unpack +the latest yasnippet-x.y.z.tar.bz2. You'll get a directory named +yasnippet-x.y.z, which you can put it in your +~/.emacs.d/plugins and add the following in your .emacs file:

+
+
(add-to-list 'load-path
+              "~/.emacs.d/plugins/yasnippet-x.y.z")
+(require 'yasnippet) ;; not yasnippet-bundle
+(yas/initialize)
+(yas/load-directory "~/.emacs.d/plugins/yasnippet-x.y.z/snippets")
+
+
+

Please refer to the documentation for full customization, or use the +customization group.

+
+
+
+

How to use YASnippet

+

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.

+

Hence this section has been split into separate documents:

+
    +
  1. Organizing Snippets
  2. +
+
+Describes ways to organize your snippets in the hard disk (or not +organize them at all and just use yasnippet-bundle.el.
+
    +
  1. Expanding Snippets
  2. +
+
+

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, or be prompted using +ido, etc...

+
+
    +
  1. Writing Snippets
  2. +
+
+Describes the YASnippet definition syntax, which is very close (but +not equivalent) to Textmate's. Includes a section about converting +TextMate snippets.
+
    +
  1. The YASnippet menu
  2. +
+
+Explains how to use the YASnippet menu to explore, learn and modify +snippets.
+
+
+

Bugs, Contribution and Support

+
    +
  • If you find a bug, please report it at Issue List.
  • +
  • If you have problem using YASnippet, or have some new ideas, +including snippets, please post to the discussion group.
  • +
+

Thank you very much for using YASnippet!

+ +
+
+
+
+
+
+
+ + +
+ + -- cgit v1.2.3