Search 如何从emac中的交互式正则表达式搜索中获得高亮显示,以便在停用之前保持高亮显示?
如何从emac中的交互式正则表达式搜索中获得高亮显示,以便在停用之前保持高亮显示?例如,在提供文本的情况下,运行带有输入“file”的M-C-s(Regexp I-Search)将突出显示下面文本中的3个“file”单词Search 如何从emac中的交互式正则表达式搜索中获得高亮显示,以便在停用之前保持高亮显示?,search,emacs,highlighting,Search,Emacs,Highlighting,如何从emac中的交互式正则表达式搜索中获得高亮显示,以便在停用之前保持高亮显示?例如,在提供文本的情况下,运行带有输入“file”的M-C-s(Regexp I-Search)将突出显示下面文本中的3个“file”单词 ;; This buffer is for notes you don't want to save, and for Lisp evaluation. ;; If you want to create a file, visit that file with C-x C-f,
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
Regexp I-Search %> file
但是,一旦我开始编辑文件,突出显示就会消失。我想保持高亮显示一段时间,直到运行另一个命令将其关闭。我该怎么做?您正在寻找绑定到M-s h r的
高亮显示regexp
。M-s h u非高亮度
提供了一个很好的包装。如果将变量
惰性高光清理
设置为nil
,则高光将保留到下一次搜索:
(setq lazy-highlight-cleanup nil)
或者,直到手动调用M-x惰性高光清理