diff options
author | Alexander Sulfrian <alexander.sulfrian@fu-berlin.de> | 2016-08-04 16:36:14 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander.sulfrian@fu-berlin.de> | 2016-08-04 16:36:14 +0200 |
commit | 8785229ecb54e64f9d48611d8cf0925109271e4c (patch) | |
tree | f809b360f07318bc86c524e79fec63c7b1d8e43e | |
parent | 24fae775642bd782a49144b21e7523460861867a (diff) | |
download | emacs-8785229ecb54e64f9d48611d8cf0925109271e4c.tar.gz emacs-8785229ecb54e64f9d48611d8cf0925109271e4c.tar.xz emacs-8785229ecb54e64f9d48611d8cf0925109271e4c.zip |
init: Modularize yasnippet config
-rw-r--r-- | init.d/main.org | 30 |
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 |