summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--init.d/main.org30
1 files changed, 21 insertions, 9 deletions
diff --git a/init.d/main.org b/init.d/main.org
index 6ad85a0..ee7eb7d 100644
--- a/init.d/main.org
+++ b/init.d/main.org
@@ -2738,18 +2738,30 @@ with a custom name and closes it after sending the mail.
** yasnippet
-I want to use yasnippets everywhere, so I enable the global mode. In
-addition to the default snippets I have some in my personal dir. It
+#+begin_src emacs-lisp
+ (use-package yasnippet
+ :diminish yas-minor-mode
+ :config
+ <<yas>>)
+#+end_src
+
+*** Own snippet directory
+
+In addition to the default snippets I have some in my personal dir.
+
+#+begin_src emacs-lisp :tangle no :noweb-ref yas
+ (setq yas-snippet-dirs `("~/.emacs.d/snippets/"
+ ,yas-installed-snippets-dir))
+#+end_src
+
+*** Enable global mode
+
+I want to use yasnippets everywhere, so I enable the global mode. It
does not load the all snippets during startup, but only if the first
buffer switches to the corresponding mode (only the directories are
searched during activation of the global mode).
-#+begin_src emacs-lisp
- (use-package yasnippet
- :config
- (setq yas-snippet-dirs `("~/.emacs.d/snippets/"
- ,yas-installed-snippets-dir))
- (yas-global-mode 1)
- :diminish yas-minor-mode)
+#+begin_src emacs-lisp :tangle no :noweb-ref yas
+ (yas-global-mode 1)
#+end_src