简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM