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)
Guy Gur-Ari
  • 201
  • 1
  • 3

1 Answers1

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)

J David Smith
  • 2,635
  • 1
  • 16
  • 27