a collection of yasnippet snippets for many languages
Emacs Lisp Roff Python C HTML
Latest commit d72698a Feb 1, 2017 @igroen igroen committed with Python 'new' snippet uses dict as method parameter (#171)
The python 'new' snippet uses dict as method argument which is a python built-in type.
Using it as a method argument hides the built-in type 'dict' in the method body.
Permalink
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 Removed contributor tag Oct 15, 2016
c-mode Deleted fopen snippet from c-mode Jun 4, 2015
cc-mode Fixing overloaded keys in cc/c++-mode Aug 26, 2016
chef-mode added machine for chef-provisioning Jan 28, 2015
cider-repl-mode Replace symlinks with .yas-parents file Nov 17, 2016
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 10, 2014
dix-mode fix conditions to work with newest yasnippet Jan 7, 2016
elixir-mode Additional Elixir snippets (#166) Nov 23, 2016
emacs-lisp-mode Fix Emacs Lisp snippets being executable Aug 1, 2016
enh-ruby-mode Replace symlinks with .yas-parents file Nov 17, 2016
ensime-mode Replace symlinks with .yas-parents file Nov 17, 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
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
js2-mode Replace symlinks with .yas-parents file Nov 17, 2016
js3-mode Replace symlinks with .yas-parents file Nov 17, 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 Add a collection of lua snippets (#170) Dec 2, 2016
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 4, 2016
perl-mode Bring perl-mode back from yasnippet 0.8.0 Aug 31, 2014
prog-mode Merge pull request #135 from sh-ow/dev Aug 8, 2016
python-mode Python 'new' snippet uses dict as method parameter (#171) Feb 1, 2017
rst-mode Rename snippets Jun 4, 2016
ruby-mode Add Enumerable snippet for Ruby Jul 3, 2016
rust-mode rust-mode: bug fix, consistency clean up + spawn Aug 1, 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 added insert in sql-mode Jun 21, 2016
text-mode Split text snippets into prog and fundamental May 31, 2014
tuareg-mode Split text snippets into prog and fundamental May 31, 2014
typerex-mode Replace symlinks with .yas-parents file Nov 17, 2016
udev-mode add a js-mode directory and more python scripts Oct 8, 2011
web-mode Replace symlinks with .yas-parents file Nov 17, 2016
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
rename_add_contr.py remove .yasnippet extension Jul 7, 2011

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.