]> code.delx.au - gnu-emacs-elpa/blob - README.mdown
Reformat README
[gnu-emacs-elpa] / README.mdown
1 # Intro
2
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,
6 Python, Ruby,
7
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]
13
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
18
19 # Install with yasnippet-bundle.el
20
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.
24
25 * Download `yasnippet-bundle` from the downloads section.
26
27 * You'll get a file named `yasnippet-bundle.el`, put it in
28 `~/.emacs.d/plugins/` (create that directory if not exists).
29
30 * Open the file in Emacs, and type `M-x eval-buffer RET`.
31
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!
35
36 To have Emacs load YASnippet automatically when it starts, put the
37 following in your ~/.emacs file:
38
39 (add-to-list 'load-path
40 "~/.emacs.d/plugins")
41 (require 'yasnippet-bundle)
42
43
44 # Install
45
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:
50
51 (add-to-list 'load-path
52 "~/.emacs.d/plugins/yasnippet-x.y.z")
53 (require 'yasnippet) ;; not yasnippet-bundle
54 (yas/initialize)
55 (yas/load-directory "~/.emacs.d/plugins/yasnippet-x.y.z/snippets")
56
57
58 # How-tos, Bugs, Contributions...
59
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])
64
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!
69
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
74
75
76