Collection of snippets for yasnippet
Go to file
Andrea Crotti 0253a7eb57 move everything in snippets as it should be (#203) 2017-08-13 12:16:55 +01:00
snippets move everything in snippets as it should be (#203) 2017-08-13 12:16:55 +01:00
.gitignore ignore compiled snippets 2014-10-03 11:24:04 -04:00
.nosearch Create .nosearch 2014-10-04 13:22:04 -04:00
CONTRIBUTORS.txt add contributors file 2013-12-11 20:43:44 +00:00
LICENSE gpl v3 2017-08-11 20:29:58 +01:00
README.md update docs fixes #100 2015-09-22 15:01:31 +01:00
rename_add_contr.py remove .yasnippet extension 2011-07-07 14:32:44 +02:00
yasnippet-snippets-pkg.el move everything in snippets as it should be (#203) 2017-08-13 12:16:55 +01:00
yasnippet-snippets.el move everything in snippets as it should be (#203) 2017-08-13 12:16:55 +01:00

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.