From 1e7f3f1d5d9faaeec4d1323bd6b3d2f42d0d10d9 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Thu, 11 Oct 2018 14:19:49 -0400 Subject: [PATCH] added autofill mode prompt to latex --- conf.org | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/conf.org b/conf.org index d69c6ac..f8c74fd 100644 --- a/conf.org +++ b/conf.org @@ -478,10 +478,15 @@ NOTES: '((company-ghc)))))) #+END_SRC *** latex +**** flycheck +Flycheck should work out of the box. #+BEGIN_SRC emacs-lisp (add-hook 'LaTeX-mode-hook #'flycheck-mode) (add-hook 'Tex-latex-mode-hook #'flycheck-mode) - +#+END_SRC +**** company +There are two backends which (kinda) complement each other. The =company-math= package should privide completion for math symbols and the =company-auctex= package should cover pretty much everything else. +#+BEGIN_SRC emacs-lisp (defun nd/init-company-auctex () "Set the company backends for auctex modes." (setq-local company-backends '((company-auctex-labels @@ -509,6 +514,17 @@ NOTES: (Tex-latex-mode . company-mode) (Tex-latex-mode . nd/init-company-auctex))) #+END_SRC +**** auto-fill-mode +I like having my lines short and readable (also easier to git). Turn on autofill here and also make a nice vertical line at 80 chars (=visual-line-mode=). +#+BEGIN_SRC emacs-lisp +(defun nd/turn-on-auto-fill-maybe () + "Prompts user to turn on `auto-fill-mode'." + (when (y-or-n-p "Activate Auto Fill Mode? ") + (turn-on-auto-fill))) + +(add-hook 'LaTeX-mode-hook #'nd/turn-on-auto-fill-maybe) +(add-hook 'LaTeX-mode-hook #'fci-mode) +#+END_SRC * org-mode ** major mode *** general config