Use map! for nilling out cdlatex's keymap

I previously thought this didn't work, but it seems to now...?
This commit is contained in:
yoavm448 2020-02-08 00:37:13 +02:00
parent 883a326e87
commit afe819e2a1

View file

@ -125,22 +125,25 @@ If no viewers are found, `latex-preview-pane' is used.")
:hook (LaTeX-mode . cdlatex-mode)
:config
;; Disabling keys that have overlapping functionality with other parts of Doom
;; smartparens takes care of inserting closing delimiters
(define-key cdlatex-mode-map "$" nil)
(define-key cdlatex-mode-map "(" nil)
(define-key cdlatex-mode-map "{" nil)
(define-key cdlatex-mode-map "[" nil)
(define-key cdlatex-mode-map "|" nil)
(define-key cdlatex-mode-map "<" nil)
;; TAB is used for cdlatex's snippets and navigation. But have yasnippet for that.
(when (featurep! :editor snippets)
(define-key cdlatex-mode-map "\t" nil))
;; AUCTeX takes care of auto-inserting {} on _^ if you want, with `TeX-electric-sub-and-superscript'
(define-key cdlatex-mode-map "^" nil)
(define-key cdlatex-mode-map "_" nil)
;; AUCTeX already provides this with `LaTeX-insert-item'
(define-key cdlatex-mode-map [(control return)] nil))
(map! :map cdlatex-mode-map
;; smartparens takes care of inserting closing delimiters, and if you
;; don't use smartparens you probably won't want these also.
:g "$" nil
:g "(" nil
:g "{" nil
:g "[" nil
:g "|" nil
:g "<" nil
;; TAB is used for cdlatex's snippets and navigation. But have yasnippet
;; for that.
(:when (featurep! :editor snippets)
:g "TAB" nil)
;; AUCTeX takes care of auto-inserting {} on _^ if you want, with
;; `TeX-electric-sub-and-superscript'
:g "^" nil
:g "_" nil
;; AUCTeX already provides this with `LaTeX-insert-item'
:g [(control return)] nil))
;; Nicely indent lines that have wrapped when visual line mode is activated