Skip to content
a collection of yasnippet snippets for many languages
Groff Emacs Lisp Python C HTML
Find file
Latest commit c774c61 @AndreaCrotti fixes #124
Failed to load latest commit information.
antlr-mode remove all user entries
applescript-mode Split text snippets into prog and fundamental
c++-mode c++-mode/cout: surround `\n' with double quote
c-mode Deleted fopen snippet from c-mode
cc-mode remove extra newline referencing #122
chef-mode added machine for chef-provisioning
clojure-mode import a few clojure and elixir snippets
cmake-mode Some improvements to the cmake snippets.
conf-unix-mode remove all user entries
cperl-mode Bring cperl-mode back from yasnippet 0.8.0
cpp-omnet-mode remove all user entries
csharp-mode Replace some legacy usage of 'text' with 'yas-text'
css-mode remove incorrect use of binding: directive
dix-mode fix conditions to work with newest yasnippet
elixir-mode import a few clojure and elixir snippets
emacs-lisp-mode Improvements to several elisp snippets
erc-mode remove all user entries
erlang-mode add a whole bunch of snippets taken from other people
f90-mode Remove redundant/identical snippets
faust-mode add faust-mode
fundamental-mode remove snippets in fundamdental-mode, leaving the directory just to not
git-commit-mode magit-log-edit-mode obsoleted by git-commit-mode
go-mode go-mode: add a new snippet for parallel benchmark
groovy-mode Split text snippets into prog and fundamental
haskell-mode fixes #124
html-mode Added HTmL imports snippet, part of the web components specification.
java-mode few more improvements
js-mode Merge pull request #105 from joeheyming/master
latex-mode latex-mode: add enumerate and improve itemize
lisp-interaction-mode remove a few contributor settings
lisp-mode Adding a few lisp snippets
lua-mode remove a few contributor settings
m4-mode remove all user entries
makefile-automake-mode remove a few contributor settings
makefile-bsdmake-mode remove all user entries
makefile-gmake-mode Add shell snippet for makefile-gmake-mode
makefile-mode Move clean snippet to `makefile-mode`
malabar-mode few java snippets
markdown-mode add highlight snippet for markdown-mode, jekyll
ned-mode Split text snippets into prog and fundamental
nesc-mode closes issue #20 removing empty snippets
nsis-mode Split text snippets into prog and fundamental
nxml-mode massive cleanup of very simple tags that don't add much value anyway
octave-mode remove all user entries
org-mode remove unnecessary snippet closing #110
perl-mode Bring perl-mode back from yasnippet 0.8.0
prog-mode prog-mode/fixme: disable on sh-mode
python-mode Fixed class snippet name
rst-mode Split text snippets into prog and fundamental
ruby-mode Move Ruby mod snippet to ruby-mode
scala-mode remove snippets provided by ENSIME
sh-mode Use portable version of bash shebang
snippet-mode Give a useful body to snippet-mode/cont(ributor)
sql-mode Split text snippets into prog and fundamental
text-mode Split text snippets into prog and fundamental
tuareg-mode Split text snippets into prog and fundamental
udev-mode add a js-mode directory and more python scripts
yaml-mode Split text snippets into prog and fundamental
.gitignore ignore compiled snippets
.nosearch Create .nosearch
CONTRIBUTORS.txt add contributors file
LICENSE Update LICENSE update docs fixes #100
cider-repl-mode new link
enh-ruby-mode add enhanced-ruby-mode alias
ensime-mode new pythoon
js2-mode use a symlink instead of yas-parents for equivalent modes remove .yasnippet extension
typerex-mode fixes #29
web-mode Add symlink for web-mode to html-mode

Yasnippet official snippet collections

Join the chat at 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


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.


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:

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

Something went wrong with that request. Please try again.