a collection of yasnippet snippets for many languages
Groff Emacs Lisp Python C HTML
Latest commit 4e2ec80 Jul 20, 2016 @AndreaCrotti committed on GitHub Merge pull request #152 from sshaw/master
Add include & Enumerable Snippet for Ruby
Failed to load latest commit information.
antlr-mode remove all user entries Dec 11, 2011
applescript-mode Split text snippets into prog and fundamental May 31, 2014
c++-mode c++-mode/class11: move some code to functions in .yas-setup.el May 9, 2016
c-mode Deleted fopen snippet from c-mode Jun 4, 2015
cc-mode remove extra newline referencing #122 Jan 31, 2016
chef-mode added machine for chef-provisioning Jan 28, 2015
clojure-mode import a few clojure and elixir snippets Mar 22, 2015
cmake-mode Some improvements to the cmake snippets. Jan 12, 2016
conf-unix-mode remove all user entries Dec 11, 2011
cperl-mode Bring cperl-mode back from yasnippet 0.8.0 Aug 31, 2014
cpp-omnet-mode remove all user entries Dec 11, 2011
csharp-mode Add foreach snippet for C#. Jun 2, 2016
css-mode remove incorrect use of binding: directive Dec 9, 2014
dix-mode fix conditions to work with newest yasnippet Jan 7, 2016
elixir-mode Add elixir IEx.pry snippet May 4, 2016
emacs-lisp-mode Add defconst for elisp. Apr 5, 2016
erc-mode remove all user entries Dec 11, 2011
erlang-mode add a whole bunch of snippets taken from other people Nov 3, 2011
f90-mode Remove redundant/identical snippets Jun 3, 2015
faust-mode add faust-mode Feb 10, 2016
fundamental-mode remove snippets in fundamdental-mode, leaving the directory just to not Sep 5, 2014
git-commit-mode magit-log-edit-mode obsoleted by git-commit-mode May 31, 2014
go-mode go-mode: add a new snippet for parallel benchmark Jan 22, 2016
groovy-mode Split text snippets into prog and fundamental May 31, 2014
haskell-mode fixes #124 Feb 11, 2016
html-mode Added HTmL imports snippet, part of the web components specification. Jan 25, 2016
java-mode few more improvements Dec 13, 2014
js-mode Merge pull request #105 from joeheyming/master Jan 13, 2016
latex-mode latex: added complete template for moderncv class May 9, 2016
lisp-interaction-mode remove a few contributor settings Dec 11, 2011
lisp-mode Adding a few lisp snippets Jan 20, 2015
lua-mode remove a few contributor settings Dec 11, 2011
m4-mode remove all user entries Dec 11, 2011
makefile-automake-mode remove a few contributor settings Dec 11, 2011
makefile-bsdmake-mode remove all user entries Dec 11, 2011
makefile-gmake-mode Add shell snippet for makefile-gmake-mode Oct 4, 2015
makefile-mode Move clean snippet to `makefile-mode` Sep 29, 2015
malabar-mode few java snippets Dec 13, 2014
markdown-mode add highlight snippet for markdown-mode, jekyll May 18, 2015
ned-mode Split text snippets into prog and fundamental May 31, 2014
nesc-mode closes issue #20 removing empty snippets Feb 23, 2014
nix-mode nix-mode package_url: escape $ and { in name Apr 5, 2016
nsis-mode Split text snippets into prog and fundamental May 31, 2014
nxml-mode massive cleanup of very simple tags that don't add much value anyway Aug 24, 2014
octave-mode remove all user entries Dec 11, 2011
org-mode add plantuml snippet Jun 3, 2016
perl-mode Bring perl-mode back from yasnippet 0.8.0 Aug 31, 2014
prog-mode prog-mode/fixme: disable on sh-mode Jan 30, 2015
python-mode added python subclass snippet 🐍 Jun 6, 2016
rst-mode Rename snippets Jun 4, 2016
ruby-mode Add Enumerable snippet for Ruby Jul 2, 2016
scala-mode add snippet for value classes Apr 12, 2016
sh-mode sh-mode while-loop May 16, 2016
snippet-mode Give a useful body to snippet-mode/cont(ributor) May 11, 2014
sql-mode Split text snippets into prog and fundamental May 31, 2014
text-mode Split text snippets into prog and fundamental May 31, 2014
tuareg-mode Split text snippets into prog and fundamental May 31, 2014
udev-mode add a js-mode directory and more python scripts Oct 8, 2011
yaml-mode Split text snippets into prog and fundamental May 31, 2014
.gitignore ignore compiled snippets Oct 3, 2014
.nosearch Create .nosearch Oct 4, 2014
CONTRIBUTORS.txt add contributors file Dec 11, 2013
LICENSE Update LICENSE May 17, 2014
README.md update docs fixes #100 Sep 22, 2015
cider-repl-mode new link Apr 13, 2015
enh-ruby-mode add enhanced-ruby-mode alias Aug 21, 2014
ensime-mode new pythoon Mar 12, 2012
js2-mode use a symlink instead of yas-parents for equivalent modes Apr 9, 2015
js3-mode js3-mode support, closes #123 Mar 6, 2016
rename_add_contr.py remove .yasnippet extension Jul 7, 2011
typerex-mode fixes #29 Apr 17, 2014
web-mode Add symlink for web-mode to html-mode Dec 31, 2015

README.md

Yasnippet official snippet collections

Join the chat at https://gitter.im/AndreaCrotti/yasnippet-snippets This repository contains the official snippets for yasnippet, as you can see from the git submodules link.

How to install

There are two options, if you have checked out yasnippet already, the only thing you need to do is to run git submodule update --init and it will checkout automatically this repository, at the last version it was synchronized too.

Otherwise if you want the latest and greatest snippets collection proceed as follows:

  1. clone this repository
  2. add to your .emacs the following

    • (add-to-list 'yas-snippet-dirs "$$DIRECTORY_WHERE_YOU_CLONED")
    • and in case you want to enable yasnippet globally: (yas-global-mode t)
  3. M-x yas-reload-all to activate them

Contributing

This repository has now become the default snippets repository (as a submodule) in yasnippet. So if you have any useful snippets for any language or framework please feel free to contribute.

To study the current snippets I suggest to use M-x yas-describe-tables which will gave a table representation of all the snippets available in the current mode.

Guidelines

Snippets need to be generic enough to be useful for everyone, and not contain anything specific to your own system.

Various notes

HTML snippets

Until September 1st 2014 there were a lot of HTML snippets in the repository, which were sometimes useful but I came to the conclusion that yasnippet was not the right fool for them, so they were removed in this pull request: https://github.com/AndreaCrotti/yasnippet-snippets/pull/49

To everyone writing a lot of HTML I suggest using emmet mode instead, which is a much more powerful mode for writing HTML tags.