Contents
YASnippet is a re-design and re-write of my original extension smart-snippet. It is much cleaner and more powerful than smart-snippet.
Watch the screencast at YouTube or download the one with a higher resolution.
Download the latest bundle release [1] from the downloads page.
Create a directory ~/emacs/plugins.
Unpack the downloaded bundle to that directory.
Add the following code to your ~/.emacs file:
(add-to-list 'load-path
"~/emacs/plugins")
(require 'yasnippet-bundle)
Download the latest YASnippet release package [2] from the downloads page.
Unpack it to a directory and add that directory to your load-path.
Add the following code to your ~/.emacs file:
(require 'yasnippet) ;; not yasnippet-bundle
(yas/initialize)
(yas/load-directory "/path/to/the/snippets/directory/")
You can inspect into the snippets directory for adding your own snippets.
Detailed document can be found at the doc directory.
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
If you like YASnippet, you can recommendate it to your friends.
If you find a bug you can create a new issue at the issue list. Please describe the problem as clear as possible.
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.
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.