Latex layer: Add shortcuts for fill and comment

This commit is contained in:
Kechao CAI 2016-02-27 10:30:41 +08:00 committed by Eivind Fonn
parent 35d9e387de
commit c3fae7dd05
2 changed files with 18 additions and 7 deletions

View File

@ -91,6 +91,8 @@ is nil.
| ~SPC m ,~ | TeX command on master file |
| ~SPC m .~ | mark LaTeX environment |
| ~SPC m *~ | mark LaTeX section |
| ~SPC m %~ | comment or uncomment a paragraph |
| ~SPC m ;~ | comment or uncomment a region |
| ~SPC m b~ | build |
| ~SPC m c~ | close LaTeX environment |
| ~SPC m e~ | insert LaTeX environment |
@ -101,6 +103,10 @@ is nil.
| ~SPC m s~ | insert LaTeX section |
| ~SPC m v~ | view output |
| ~SPC m h d~ | TeX documentation, can be very slow |
| ~SPC m f e~ | fill LaTeX environment |
| ~SPC m f p~ | fill LaTeX paragraph |
| ~SPC m f r~ | fill LaTeX region |
| ~SPC m f s~ | fill LaTeX section |
| ~SPC m p r~ | preview region |
| ~SPC m p b~ | preview buffer |
| ~SPC m p d~ | preview document |
@ -152,4 +158,3 @@ Available only when =latex-enable-auto-fill= is non nil.
| ~SPC m r t~ | reftex-toc |
| ~SPC m r T~ | reftex-toc-recenter |
| ~SPC m r v~ | reftex-view-crossref |
| | |

View File

@ -50,13 +50,15 @@
;; Key bindings for plain TeX
(dolist (mode '(tex-mode latex-mode))
(spacemacs/set-leader-keys-for-major-mode mode
"\\" 'TeX-insert-macro ;; C-c C-m
"-" 'TeX-recenter-output-buffer ;; C-c C-l
"\\" 'TeX-insert-macro ;; C-c C-m
"-" 'TeX-recenter-output-buffer ;; C-c C-l
"%" 'TeX-comment-or-uncomment-paragraph ;; C-c %
";" 'TeX-comment-or-uncomment-region ;; C-c ; or C-c :
"b" 'latex/build
"k" 'TeX-kill-job ;; C-c C-k
"l" 'TeX-recenter-output-buffer ;; C-c C-l
"m" 'TeX-insert-macro ;; C-c C-m
"v" 'TeX-view ;; C-c C-v
"k" 'TeX-kill-job ;; C-c C-k
"l" 'TeX-recenter-output-buffer ;; C-c C-l
"m" 'TeX-insert-macro ;; C-c C-m
"v" 'TeX-view ;; C-c C-v
;; TeX-doc is a very slow function
"hd" 'TeX-doc
"xb" 'latex/font-bold
@ -92,6 +94,10 @@
"e" 'LaTeX-environment ;; C-c C-e
"i" 'LaTeX-insert-item ;; C-c C-j
"s" 'LaTeX-section ;; C-c C-s
"fe" 'LaTeX-fill-environment ;; C-c C-q C-e
"fp" 'LaTeX-fill-paragraph ;; C-c C-q C-p
"fr" 'LaTeX-fill-region ;; C-c C-q C-r
"fs" 'LaTeX-fill-section ;; C-c C-q C-s
"pb" 'preview-buffer
"pc" 'preview-clearout
"pd" 'preview-document