]> code.delx.au - gnu-emacs-elpa/commitdiff
docfix: add the workaround for using yasnippet as a non-global minor mode. See issue...
authorJoao Tavora <joaotavora@gmail.com>
Thu, 28 Jun 2012 13:28:26 +0000 (14:28 +0100)
committerJoao Tavora <joaotavora@gmail.com>
Thu, 28 Jun 2012 13:28:26 +0000 (14:28 +0100)
README.mdown

index db5e36f5ffeb68c22c9fe8f4a7d0449b3b5019d1..ea4d4f0888d50378216b6059ae57040b000ab0cd 100644 (file)
@@ -40,6 +40,16 @@ El-get is a nice way to get the most recent version, too
 
 See https://github.com/dimitri/el-get for instructions
 
+## Use `yas/minor-mode` on a per-buffer basis
+
+To use yasnippet as a non-global minor mode, replace `(yas/global-mode 1)` with
+`(yas/reload-all)` to load the snippet tables. Then add a call to
+`(yas/minor-mode)` to the major-modes where you to enable yasnippet.
+
+    (add-hook 'prog-mode-hook
+              '(lambda ()
+                 (yas/minor-mode)))
+
 # Contributing snippets
 
 Please do not ask me to add snippets to the default collection under