This commit is contained in:
Andrea Crotti 2017-08-14 09:48:30 +01:00
parent 0253a7eb57
commit 24901575cd
1 changed files with 16 additions and 11 deletions

View File

@ -1,26 +1,31 @@
# Yasnippet official snippet collections
[![Join the chat at https://gitter.im/AndreaCrotti/yasnippet-snippets](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/AndreaCrotti/yasnippet-snippets?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
This repository contains the official snippets for [yasnippet](http://github.com/capitaomorte/yasnippet), as you can see from the git submodules link.
This repository contains the official collection of snippets for [yasnippet](http://github.com/capitaomorte/yasnippet).
# 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.
## From melpa
Otherwise if you want the latest and greatest snippets collection proceed as follows:
You can install this package from melpa, first by ensuring you have it source of your pacages.
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)`
```lisp
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)
```
3. `M-x yas-reload-all` to activate them
Once that is done just refresh the packages andd install with.
* <kbd>M-x package-refresh-contents</kbd>
* <kbd>M-x package-install yasnippet-snippets</kbd>
Once that is done all the snippets will load automatically as soon as yasnippet loads.
# 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.
So if you have any useful snippets for any language or framework please feel free to contribute, by opening a PR or an issue if you have any suggestions.
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.