I'm trying to load the
yasnippets for the
LaTeX mode every time I open an
Is it possible? How can this be achieved?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
You can load an additional modes via
yas-activate-extra-mode in the hook of the major mode (it also works with
yas-global-mode turned on).
Just copy-paste following elisp snippet into your init file:
(defun my-org-latex-yas () "Activate org and LaTeX yas expansion in org-mode buffers." (yas-minor-mode) (yas-activate-extra-mode 'latex-mode)) (add-hook 'org-mode-hook #'my-org-latex-yas)