如何突出显示Emacs缓冲区中单词的所有出现? [英] How to highlight all occurrences of a word in an Emacs buffer?
问题描述
Notepad ++具有一项便利的功能:如果您在文本中选择一个单词(不一定是关键字),则该单词将在整个文本中突出显示。可以在Emacs中完成吗?如果是这样,怎么办?
Notepad++ has a convenient feature: if you select a word in your text (not necessarily a keyword), the word is highlighted throughout the text. Can this be done in Emacs as well? And if so, how?
它不一定必须完全像Notepad ++一样工作(即通过选择);理想情况下,我想设置一个键绑定,使光标下所有出现的单词都突出显示。
It doesn't necessarily have to work exactly like Notepad++ (i.e., via selection); ideally, I would like to set up a key binding that causes all occurrences of the word under cursor to be highlighted.
如果突出显示是永久的,那将是很好的,即,将移动点从突出显示的单词移开,应该不导致突出显示被删除。
It would be great if the highlights were permanent, i.e., moving point away from a highlighted word should not cause the highlight to be removed.
此外,如果有解决方案,这将非常有用
Also, it would be useful if there was a solution that made it possible to navigate between highlights (using custom key bindings).
推荐答案
也许是 http://nschum.de/src/emacs/highlight-symbol/
这篇关于如何突出显示Emacs缓冲区中单词的所有出现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!