删除尾随突出显示 [EMACS 配置]
Remove trailing highlight [EMACS config]
我一直在考虑在我的 emacs 配置文件中添加一些额外的功能。
我想要的是突出显示匹配的括号,
然而,使用 mic-paren
默认行为仅在光标之后选择关闭括号(这对于打开括号很有效)。
正在查看 this 答案,几乎实现了所需的功能,但余辉让人分心。
;;; Will highlight when cursor on closing parenthesis, however leaves afterglow...
(defadvice mic-paren-highlight (around cursorOnClosing activate)
"Dirty hack to highlight sexps with closing delim below cursor"
(if (eq (char-syntax (following-char)) ?\) )
(let ((paren-priority 'close))
(save-excursion
(forward-char)
ad-do-it))
ad-do-it))
任何更好的选择,或者您可以给我一些更正以获得所需的行为?提前致谢
对于遇到此问题的任何人,emacs 25.1 Released September 17, 2016
的新版本
来自 News 文件:
In Show Paren Mode, a parenthesis can be highlighted when point
stands inside it, and certain parens can be highlighted when point is
at BOL or EOL, or in whitespace there. To enable these, customize,
respectively, 'show-paren-when-point-inside-paren' or
'show-paren-when-point-in-periphery'.
所以为了解决这个问题:
'show-paren-when-point-inside-paren'
我一直在考虑在我的 emacs 配置文件中添加一些额外的功能。
我想要的是突出显示匹配的括号,
然而,使用 mic-paren
默认行为仅在光标之后选择关闭括号(这对于打开括号很有效)。
正在查看 this 答案,几乎实现了所需的功能,但余辉让人分心。
;;; Will highlight when cursor on closing parenthesis, however leaves afterglow...
(defadvice mic-paren-highlight (around cursorOnClosing activate)
"Dirty hack to highlight sexps with closing delim below cursor"
(if (eq (char-syntax (following-char)) ?\) )
(let ((paren-priority 'close))
(save-excursion
(forward-char)
ad-do-it))
ad-do-it))
任何更好的选择,或者您可以给我一些更正以获得所需的行为?提前致谢
对于遇到此问题的任何人,emacs 25.1 Released September 17, 2016
的新版本来自 News 文件:
In Show Paren Mode, a parenthesis can be highlighted when point
stands inside it, and certain parens can be highlighted when point is
at BOL or EOL, or in whitespace there. To enable these, customize,
respectively, 'show-paren-when-point-inside-paren' or
'show-paren-when-point-in-periphery'.
所以为了解决这个问题:
'show-paren-when-point-inside-paren'