6

When I click $ I get another matching $ thanks to smartparens. I would like to disable this behavior but keep all other matching pairs like () enabled. I tried adding this to the Spacemacs config but it doesn't work:

(sp-local-pair 'LaTeX-mode "$" nil :actions :rem)

1 Answer 1

3

Fun fact: there is LaTeX-mode, and then there is latex-mode. Both are aliases for TeX-latex-mode, which is part of the AUCTeX package. If you look at the default value of sp-pairs, you'll see settings for latex-mode, not LaTeX-mode. The following command disabled $ pairing for me in LaTex documents:

(sp-local-pair #'latex-mode "$" nil :actions nil)

(I use :actions nil because that is what is recommended by the documentation of sp-local-pair)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.