5

I'm in LaTeX/PS mode and whenever I close my $ math statements the cursor jumps to the first $ and back to the closing $. How can I disable this?

1 Answer 1

6

I assume that you are using AUCTeX. According to the documentation of TeX-insert-dollar among other things the following happens if you input the closing $ sign:

Show matching dollar sign if this dollar sign ends the TeX math mode and ‘blink-matching-paren’ is non-nil.

What you can do is to set blink-matching-paren to nil.

EDIT: This will also affect the behaviour of emacs when you input a closing parenthesis etc., but you can use other modes e.g. show-paren-mode to still highlight the opening parenthesis.

4
  • Yes, I'm using AUCTeX. What is supposed to happen for closing parenthesis? I don't think I see anything happen. Commented Apr 6, 2019 at 20:03
  • 1
    For parentesis I see the same behaviour that you describe for $, i.e. from ) the cursor jumps to ( if blink-matching-paren is set to t. But if you don't like this behaviour anyway then this should be fine.
    – andrej
    Commented Apr 6, 2019 at 20:09
  • I see the first parenthesis gets highlighted when closing, but it doesn't make my cursor jump back and fourth like with $. Is it because I am using emacs evil mode? blink-matching-paren is set to t Commented Apr 6, 2019 at 20:11
  • 1
    You are right! There is no jumping of the cursor but only highlighting. Maybe you have (as do I) the show-paren-mode activated. Without that and blink-matching-paren set to nil there is no highlighting on my system.
    – andrej
    Commented Apr 6, 2019 at 20:21

Your Answer

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

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