How to highlight all occurrences of a word in an Emacs buffer?

后端 未结 13 1031
执念已碎
执念已碎 2020-12-12 11:56

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

13条回答
  •  青春惊慌失措
    2020-12-12 12:19

    Commands in library highlight.el let you (un)highlight text matching a regexp (in this case a symbol), using overlays or text properties. You can cycle among the occurrences. Highlighting can be temporary or persistent. (more info).

提交回复
热议问题