Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?
like image 735
shinjin Avatar asked Jan 17 '13 00:01

shinjin


1 Answers

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.

like image 192
Dan Avatar answered Nov 15 '22 09:11

Dan