终于舒服了,之前一直饱受 yasnippet 还有自带的 tab 键的折磨
;; disable yasnippet into latex environment
(defun my/org-disable-yasnippet-in-latex-environment ()
(setq-local yas-buffer-local-condition '(not (org-inside-LaTeX-fragment-p))))
(add-hook! 'org-mode-hook #'my/org-disable-yasnippet-in-latex-environment)
(add-hook! 'LaTeX-mode-hook (cmd! (bind-key (kbd "<tab>") 'cdlatex-tab 'LaTeX-mode-map)))