In latex mode, using \( ... \)
is preferred over $ ... $
, so in my configuration I have the following
(sp-local-pair modes "$" nil :actions :rem)
(sp-local-pair modes "\\(" "\\)" :trigger "$")
This way, when I try to insert $
the pair \( \)
are inserted instead. This works well, however, for some reason if I select some text and press $
the pair \( \)
are inserted after the text instead of wrapping the text with them.
If I press \(
instead the selected text is wrapped correctly.
Is there a way to fix this so that if I press $
with a selected text, the text is wrapped with \( ... \)
?
:trigger-wrap "$"
after:trigger "$"
?:trigger-wrap "$"
I also had to requiresmartparens-latex
. If that works for you we'll have to dig there to answer your question.