fix(emacs): introduce align keybinds for latex
Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
parent
867fb9f6f9
commit
f0178e56f7
1 changed files with 9 additions and 1 deletions
|
@ -84,6 +84,12 @@
|
||||||
(insert "\\frac{" content "}{}")
|
(insert "\\frac{" content "}{}")
|
||||||
(backward-char)))
|
(backward-char)))
|
||||||
|
|
||||||
|
(defun latex-tab ()
|
||||||
|
"Multi-purpose tab for LaTeX."
|
||||||
|
(interactive)
|
||||||
|
(align-current)
|
||||||
|
(cdlatex-tab))
|
||||||
|
|
||||||
(defun configure-latex ()
|
(defun configure-latex ()
|
||||||
"Configure my custom LaTex environment."
|
"Configure my custom LaTex environment."
|
||||||
(electric-indent-mode -1)
|
(electric-indent-mode -1)
|
||||||
|
@ -95,7 +101,8 @@
|
||||||
|
|
||||||
(setq-local flycheck-disabled-checkers
|
(setq-local flycheck-disabled-checkers
|
||||||
'(tex-chktex))
|
'(tex-chktex))
|
||||||
|
|
||||||
|
(keymap-local-set "C-c C-a" #'align-current)
|
||||||
(keymap-local-set "C-c C-c" #'custom-compile-latex)
|
(keymap-local-set "C-c C-c" #'custom-compile-latex)
|
||||||
(keymap-local-set "C-c C-z" #'open-out-pdf)
|
(keymap-local-set "C-c C-z" #'open-out-pdf)
|
||||||
(keymap-local-set "C-c C-b" #'latex-insert-block)
|
(keymap-local-set "C-c C-b" #'latex-insert-block)
|
||||||
|
@ -104,6 +111,7 @@
|
||||||
(keymap-local-set "/" #'math-insert-frac)
|
(keymap-local-set "/" #'math-insert-frac)
|
||||||
;; For cases where we actually do want `/' in math...
|
;; For cases where we actually do want `/' in math...
|
||||||
(keymap-local-set "M-/" #'insert-raw-slash)
|
(keymap-local-set "M-/" #'insert-raw-slash)
|
||||||
|
(keymap-local-set "C-TAB" #'latex-tab)
|
||||||
(keymap-substitute cdlatex-mode-map 'cdlatex-dollar 'cdlatex-math-symbol)
|
(keymap-substitute cdlatex-mode-map 'cdlatex-dollar 'cdlatex-math-symbol)
|
||||||
(setq cdlatex-math-symbol-prefix ?$)
|
(setq cdlatex-math-symbol-prefix ?$)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue