How can I prevent the cursor from jumping when I close parentheses in Emacs?

customization, emacs

Solution

Try putting

(show-paren-mode 1)
(setq blink-matching-delay 0.3)

in your `.emacs` or `.emacs.d/init.el`.

This prevents the jumping and highlights the matching pair.

Problem

Is there a way to change Emacs' behavior when closing parentheses/bracket? Right now, the cursor will jump to the opening bracket for a few seconds and will jump back after a while or when I start typing. I find this jumping back and forth really annoying. Is there a way, to either - change the color/shape of the cursor when it's just marking the opening bracket, or - prevent the jumping at all, and just change the color of the matching pair?

Original source