]> code.delx.au - gnu-emacs-elpa/blob - packages/yasnippet/README
Merge commit '0cda39255827f283e7578cd469ae42daad9556a2' from js2-mode
[gnu-emacs-elpa] / packages / yasnippet / README
1 YASnippet is a code template system for Emacs. To enable it in all
2 buffers, add the following line to your init file:
3
4 (yas-global-mode 1)
5
6 Alternatively, you can enable `yas-minor-mode' in individual buffers.
7 When YASnippet is active, the following commands can be used:
8
9 TAB (`yas-expand')
10 Attempt to expand a snippet before point. For example, typing TAB
11 after `if' may expand a snippet beginning with `if', if one exists.
12 If no snippet expansion is possible, run the usual binding of TAB.
13
14 `C-c & C-s' (`yas-insert-snippet')
15 Prompts for a snippet, and inserts it.
16
17 `C-c & C-n' (`yas-new-snippet')
18 Opens a *new snippet* buffer where you can define a new snippet.
19 Typing C-c C-c in this buffer saves and invokes the definition.
20 The variable `yas-snippet-dirs' determines where snippet
21 definitions are stored.
22
23 `C-c & C-v' (`yas-visit-snippet-file')
24 Prompt for, and visit an existing snippet definition.
25
26 For more information and detailed usage, refer to the project page:
27
28 http://github.com/capitaomorte/yasnippet