From 103456f89fcd856ff7e790fc0dac06692a2455ff Mon Sep 17 00:00:00 2001 From: Bjarke Vad Date: Sun, 21 Dec 2014 14:23:40 +0100 Subject: [PATCH] Updated AUCTeX contrib layer with new bindings --- contrib/auctex/Readme.md | 21 ++++++++++++++++++--- contrib/auctex/packages.el | 19 ++++++++++++++++++- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/contrib/auctex/Readme.md b/contrib/auctex/Readme.md index 540837c48..656b8b3ef 100644 --- a/contrib/auctex/Readme.md +++ b/contrib/auctex/Readme.md @@ -10,10 +10,25 @@ In order to load AucTex properly you must use `SPC e l` before opening any TeX f Along with other things this layer includes company-auctex, it's only enabled if you also enable my other contrib layer `company-mode`. -## Other Things +## Keybindings -This layer binds the key `SPC m b` (and `H-r`) to save the current file, build it and view in your default viewer. -It also binds `me` and `mc` to create and close environments. +Key Binding | Description +--------------------|------------------------------------------------------------------ +SPC m b | build and view +SPC m e | insert LaTeX environment +SPC m c | close LaTeX environment +SPC m i | insert `\item` +SPC m f | insert LaTeX font - full bindings here: [AUCTeX documentation](https://www.gnu.org/software/auctex/manual/auctex/Font-Specifiers.html) +SPC m C | TeX command on master file +SPC m p r | preview region +SPC m p b| preview buffer +SPC m p d| preview document +SPC m p e| preview environment +SPC m p s| preview section +SPC m p p| preview at point +SPC m p f| cache preamble for preview +SPC m p c| clear previews +SPC m * | TeX documentation, can be very slow ## Maintainer diff --git a/contrib/auctex/packages.el b/contrib/auctex/packages.el index 01a7b4d59..6be5b0ac1 100644 --- a/contrib/auctex/packages.el +++ b/contrib/auctex/packages.el @@ -36,10 +36,27 @@ (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) (add-hook 'LaTeX-mode-hook 'spacemacs/load-yasnippet) + (setq spacemacs/key-binding-prefixes '(("mp" . "LaTeX Preview"))) (evil-leader/set-key-for-mode 'latex-mode "mb" 'auctex/build-view "me" 'LaTeX-environment - "mc" 'LaTeX-close-environment) + "mc" 'LaTeX-close-environment + "mi" 'LaTeX-insert-item + "mf" 'TeX-font ;; Find a way to rebind tex-fonts + + "mC" 'TeX-command-master + + "mpr" 'preview-region + "mpb" 'preview-buffer + "mpd" 'preview-document + "mpe" 'preview-environment + "mps" 'preview-section + "mpp" 'preview-at-point + "mpf" 'preview-cache-preamble + "mpc" 'preview-clearout + + "m?" 'TeX-doc ;; TeX-doc is a very slow function + ) (setq-default TeX-auto-save t) (setq-default TeX-parse-self t)