3 **YASnippet** is a template system for Emacs. It allows you to type an
4 abbreviation and automatically expand it into function
5 templates. Bundled language templates includes: C, C++, C#, Perl,
8 SQL, LaTeX, HTML, CSS and more. The snippet syntax is inspired from
9 [TextMate's][textmate-snippets] syntax, you can even
10 [import][import-docs] most TextMate templates to YASnippet. Watch
11 [a demo on YouTube][youtube-demo] or download a
12 [higher resolution version][high-res-demo]
14 [textmate-snippets]: http://manual.macromates.com/en/snippets
15 [import-docs]: http://yasnippet.googlecode.com/svn/trunk/doc/snippet-development.html#importing-textmate-snippets
16 [youtube-demo]: http://www.youtube.com/watch?v=76Ygeg9miao
17 [high-res-demo]: http://yasnippet.googlecode.com/files/yas_demo.avi
19 # Install with yasnippet-bundle.el
21 To quickly tryout YASnippet, download the simpler "bundle" version.
22 If you plan to modify the bundled templates and/or build your own,
23 download the "normal" package.
25 * Download `yasnippet-bundle` from the downloads section.
27 * You'll get a file named `yasnippet-bundle.el`, put it in
28 `~/.emacs.d/plugins/` (create that directory if not exists).
30 * Open the file in Emacs, and type `M-x eval-buffer RET`.
32 That's it. Now open any file, you'll see a menu "YASnippet". You can
33 pull down the menu to insert a template. Or, you can type a
34 pre-defined abbrev and press TAB to expand it!
36 To have Emacs load YASnippet automatically when it starts, put the
37 following in your ~/.emacs file:
39 (add-to-list 'load-path
41 (require 'yasnippet-bundle)
46 To install the normal archive, download and unpack the latest
47 `yasnippet-x.y.z.tar.bz2`. You'll get a directory named
48 `yasnippet-x.y.z`, put it in some `~/.emacs.d/plugins` dir and add the
49 following in your `.emacs` file:
51 (add-to-list 'load-path
52 "~/.emacs.d/plugins/yasnippet-x.y.z")
53 (require 'yasnippet) ;; not yasnippet-bundle
55 (yas/load-directory "~/.emacs.d/plugins/yasnippet-x.y.z/snippets")
58 # How-tos, Bugs, Contributions...
60 Please refer to the comprehensive [documentation] [docs] for full
61 customization and support. <!-- If you find a bug, please report it on -->
62 <!-- [the GitHub issue tracker][issues]. (please **do not** the deprecated -->
63 <!-- [googlecode tracker][googlecode tracker]) -->
65 If you run into problems using YASnippet, or have snippets to
66 contribute, post to the
67 [yasnippet google group][forum]. Thank
68 you very much for using YASnippet!
70 [docs]: http://yasnippet.googlecode.com/svn/trunk/doc/index.html
71 [issues]: https://github.com/capitaomorte/yasnippet/issues
72 [googlecode tracker]: http://code.google.com/p/yasnippet/issues/list
73 [forum]: http://groups.google.com/group/smart-snippet