[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 7b82424 046/177: move index.org subsection into snippet-ex
From: |
João Távora |
Subject: |
[elpa] master 7b82424 046/177: move index.org subsection into snippet-expansion.org |
Date: |
Sat, 28 Mar 2015 15:40:44 +0000 |
branch: master
commit 7b8242473558f3b26eb893e97bda8c5532a0dbd1
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
move index.org subsection into snippet-expansion.org
---
doc/index.org | 36 -------------------------------
doc/snippet-expansion.org | 52 ++++++++++++++++++++++++++-------------------
2 files changed, 30 insertions(+), 58 deletions(-)
diff --git a/doc/index.org b/doc/index.org
index c4bb052..54ec232 100644
--- a/doc/index.org
+++ b/doc/index.org
@@ -127,42 +127,6 @@
If you run into problems using YASnippet, or have snippets to contribute,
post to the [[http://groups.google.com/group/smart-snippet][yasnippet
forum]]. Thank you very much for using YASnippet!
-
-* Expanding Snippets
-
- :PROPERTIES:
- :CUSTOM_ID: expand-snippets
- :END:
-
- This section describes how YASnippet chooses snippets for expansion at point.
-
- Maybe, you'll want some snippets to be expanded in a particular
- mode, or only under certain conditions, or be prompted using
-
-** Triggering expansion
-
- To make a snippet expand after the cursor:
-
- * Type the snippet's *trigger key* then calling
[[sym:yas-expand][=yas-expand=]]. It's bound to
- =TAB= and =<tab>= by default, to change it use
-
- #+begin_src emacs-lisp :exports code
- (define-key yas-minor-mode-map (kbd "<tab>") nil)
- (define-key yas-minor-mode-map (kbd "TAB") nil)
- (define-key yas-minor-mode-map (kbd "<the new key>") 'yas-expand)
- #+end_src
-
- * Use the snippet's *keybinding*.
-
- * Call [[sym:yas-insert-snippet][=yas-insert-snippet=]] (use =M-x
- yas-insert-snippet== or its keybinding =C-c & C-s=).
-
- * By expanding directly from the "YASnippet" menu in the menu-bar
-
- * Using hippie-expand
-
- * Use m2m's excellent auto-complete
-
# Local Variables:
# mode: org
# fill-column: 80
diff --git a/doc/snippet-expansion.org b/doc/snippet-expansion.org
index 75efe86..af0fe21 100644
--- a/doc/snippet-expansion.org
+++ b/doc/snippet-expansion.org
@@ -1,38 +1,49 @@
+#+SETUPFILE: org-setup.inc
+
* Expanding snippets
+ This section describes how YASnippet chooses snippets for expansion at point.
+
+ Maybe, you'll want some snippets to be expanded in a particular
+ mode, or only under certain conditions, or be prompted using
+
** Triggering expansion
-You can use YASnippet to expand snippets in different ways:
+ You can use YASnippet to expand snippets in different ways:
-- By typing an abbrev, the snippet /trigger key/, and then pressing the
- key defined in =yas-trigger-key= (which defaults to "TAB"). This
- works in buffers where the minor mode =yas-minor-mode= is active;
+ - When =yas-minor-mode= is active:
+ - Type the snippet's *trigger key* then calling
[[sym:yas-expand][=yas-expand=]]
+ (bound to =TAB= by default).
-- By invoking the command =yas-insert-snippet= (either by typing
- =M-x yas-insert-snippet= or its keybinding). This does /not/ require
- =yas-minor-mode= to be active.
+ - Use the snippet's *keybinding*.
-- By using the keybinding associated with an active snippet. This also
- requires =yas-minor-mode= to be active;
+ - By expanding directly from the "YASnippet" menu in the menu-bar
-- By expanding directly from the "YASnippet" menu in the menu-bar
+ - Using hippie-expand
-- By using hippie-expand
+ - Call [[sym:yas-insert-snippet][=yas-insert-snippet=]] (use =M-x
yas-insert-snippet== or its
+ keybinding =C-c & C-s=).
-- Expanding from emacs-lisp code
+ - Use m2m's excellent auto-complete
+ TODO: example for this
+
+ - Expanding from emacs-lisp code
*** Trigger key
-When =yas-minor-mode= is enabled, the keybinding taken from
-=yas-trigger-key= will take effect.
+=yas-expand= tries to expand a /snippet abbrev/ (also known as
+/snippet key/) before point.
-=yas-trigger-key= invokes =yas-expand=, which tries to expand a /snippet
-abbrev/ (also known as /snippet key/) before point.
+When =yas-minor-mode= is enabled, it binds [[sym:yas-expand][=yas-expand=]] to
=TAB= and
+=<tab>= by default, however, you can freely set it to some other key:
-The default key is ="TAB"=, however, you can freely set it to some other
-key.
+#+begin_src emacs-lisp :exports code
+ (define-key yas-minor-mode-map (kbd "<tab>") nil)
+ (define-key yas-minor-mode-map (kbd "TAB") nil)
+ (define-key yas-minor-mode-map (kbd "<the new key>") 'yas-expand)
+#+end_src
-[[images/minor-mode-indicator.png]]
+[[./images/minor-mode-indicator.png]]
To enable the YASnippet minor mode in all buffers globally use the
command =yas-global-mode=.
@@ -41,9 +52,6 @@ When you use =yas-global-mode= you can also selectively
disable
YASnippet in some buffers by setting the buffer-local variable
=yas-dont-active= in the buffer's mode hook.
-Trouble when using or understanding the =yas-trigger-key= is easily the
-most controversial issue in YASsnippet. See the [[faq.html][FAQ]].
-
**** Fallback bahaviour
=yas-fallback-behaviour= is a customization variable bound to
- [elpa] master b20f0a4 034/177: fix exporting of doc strings for org manual, (continued)
- [elpa] master b20f0a4 034/177: fix exporting of doc strings for org manual, João Távora, 2015/03/28
- [elpa] master f5457df 031/177: Go back to org manual, João Távora, 2015/03/28
- [elpa] master 0f67c07 030/177: Merge pull request #424 from ljos/de/activate-extra-mode, João Távora, 2015/03/28
- [elpa] master 8e8320f 036/177: remove reference to yas-trigger-key, João Távora, 2015/03/28
- [elpa] master 042837d 038/177: Migrate to snippets maintained by the TextMate community, João Távora, 2015/03/28
- [elpa] master 81e26b4 039/177: Merge pull request #431 from ignisf/update-snippet-submodules, João Távora, 2015/03/28
- [elpa] master c7c6516 040/177: don't use link abbreviations, João Távora, 2015/03/28
- [elpa] master d451fef 041/177: rename manual.org to index.org, João Távora, 2015/03/28
- [elpa] master 5acc976 043/177: split symbol reference into separate file, João Távora, 2015/03/28
- [elpa] master fd8423c 045/177: fix links, João Távora, 2015/03/28
- [elpa] master 7b82424 046/177: move index.org subsection into snippet-expansion.org,
João Távora <=
- [elpa] master 3002594 037/177: Merge pull request #430 from npostavs/org-doc, João Távora, 2015/03/28
- [elpa] master 875ef77 044/177: move index.org subsection into snippet-organization.org, João Távora, 2015/03/28
- [elpa] master 2f7bb6c 048/177: move images to the section they describe, João Távora, 2015/03/28
- [elpa] master 8f1fa08 049/177: replace obsolete refs, João Távora, 2015/03/28
- [elpa] master 08a44b4 050/177: add code examples for snippet-expansion.rst, João Távora, 2015/03/28
- [elpa] master dfdb89c 054/177: remove erroneous #+BEGIN/END_QUOTE, João Távora, 2015/03/28
- [elpa] master eaeb6ff 051/177: more links to docstrings, don't repeat docstrings, João Távora, 2015/03/28
- [elpa] master 07b1d39 056/177: move #+STARTUP to org-setup.inc; add #+LINK_HOME, João Távora, 2015/03/28
- [elpa] master fd3fa39 057/177: publish org doc from Rakefile, João Távora, 2015/03/28
- [elpa] master 2c237cc 060/177: check function doc before variable doc, João Távora, 2015/03/28