latex: move folding on SPC m z and update doc

This commit is contained in:
syl20bnr 2016-01-03 23:51:19 -05:00
parent 089462282e
commit b0e4232868
2 changed files with 29 additions and 12 deletions

View File

@ -12,7 +12,9 @@
- [[Previewing][Previewing]]
- [[Build command][Build command]]
- [[Auto-fill][Auto-fill]]
- [[Folding][Folding]]
- [[Keybindings][Keybindings]]
- [[Folding][Folding]]
- [[RefTeX][RefTeX]]
* Description
@ -74,6 +76,15 @@ The variable =latex-nofill-env= provide the list of environment names where
(latex :variables latex-enable-auto-fill t))
#+END_SRC
** Folding
Enable folding of text by setting =latex-enable-folding= to =t=. Default value
is nil.
#+BEGIN_SRC emacs-lisp
dotspacemacs-configuration-layers '(
(latex :variables latex-enable-folding t))
#+END_SRC
* Keybindings
| Key Binding | Description |
@ -85,11 +96,6 @@ The variable =latex-nofill-env= provide the list of environment names where
| ~SPC m b~ | build |
| ~SPC m c~ | close LaTeX environment |
| ~SPC m e~ | insert LaTeX environment |
| ~SPC m f f~ | fold TeX buffer |
| ~SPC m f e~ | fold TeX environment |
| ~SPC m f m~ | fold TeX macro |
| ~SPC m f =~ | fold TeX math |
| ~SPC m f r~ | fold TeX region |
| ~SPC m i~ | insert =\item= |
| ~SPC m k~ | kill TeX job |
| ~SPC m l~ | recenter output buffer |
@ -120,6 +126,17 @@ The variable =latex-nofill-env= provide the list of environment names where
| ~SPC m x f r~ | use serif font |
| ~SPC m x f u~ | use upright font |
** Folding
Available only when =latex-enable-auto-fill= is non nil.
| Key Binding | Description |
|-------------+----------------------|
| ~SPC m z =~ | fold TeX math |
| ~SPC m z b~ | fold TeX buffer |
| ~SPC m z e~ | fold TeX environment |
| ~SPC m z m~ | fold TeX macro |
| ~SPC m z r~ | fold TeX region |
** RefTeX
| Key Binding | Description |

View File

@ -77,13 +77,13 @@
dotspacemacs-major-mode-leader-key 'TeX-command-master))
(when latex-enable-folding
(spacemacs/set-leader-keys-for-major-mode mode
"ff" 'TeX-fold-buffer
"fe" 'TeX-fold-env
"fm" 'TeX-fold-macro
"f=" 'TeX-fold-math
"fr" 'TeX-fold-region))
(spacemacs/declare-prefix-for-mode mode "mf" "fold")
(spacemacs/declare-prefix-for-mode mode "mx" "text/fonts"))
"z=" 'TeX-fold-math
"zb" 'TeX-fold-buffer
"ze" 'TeX-fold-env
"zm" 'TeX-fold-macro
"zr" 'TeX-fold-region))
(spacemacs/declare-prefix-for-mode mode "mx" "text/fonts")
(spacemacs/declare-prefix-for-mode mode "mz" "fold"))
;; Key bindings specific to LaTeX
(spacemacs/set-leader-keys-for-major-mode 'latex-mode