From a6d3a4fc2e13488b967f5064aff9f27266eeb5f3 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Thu, 17 Dec 2015 00:20:12 -0500 Subject: [PATCH] Rearrange yasnippet config --- .emacs.d/init.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 8694889..91e6471 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -211,13 +211,19 @@ (global-fasd-mode 1) (setq fasd-enable-initial-prompt nil)) (use-package yasnippet + :defer + :init + (add-hook 'LaTeX-mode-hook + '(lambda () + (yas-minor-mode) + (define-key company-active-map "" 'company-to-yasnippet) + (define-key (current-local-map) "" 'company-yasnippet))) :config + (yas-reload-all) (defun company-to-yasnippet () (interactive) (company-abort) - (call-interactively 'company-yasnippet)) - (bind-key "" 'company-to-yasnippet company-active-map) - (bind-key "" 'company-yasnippet)) + (call-interactively 'company-yasnippet))) (use-package swiper :bind ("C-S-s" . swiper) :bind ("C-S-r" . swiper))