Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Search 如何从emac中的交互式正则表达式搜索中获得高亮显示,以便在停用之前保持高亮显示?_Search_Emacs_Highlighting - Fatal编程技术网

Search 如何从emac中的交互式正则表达式搜索中获得高亮显示,以便在停用之前保持高亮显示?

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,

如何从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,
;; 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惰性高光清理