如何突出显示 Emacs 缓冲区中出现的所有单词?

编程入门 行业动态 更新时间:2024-10-28 04:21:07
本文介绍了如何突出显示 Emacs 缓冲区中出现的所有单词?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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).

推荐答案

也许 highlight-symbol.el 在 http://nschum.de/src/emacs/highlight-symbol/ 就是你要找的:

Maybe highlight-symbol.el at http://nschum.de/src/emacs/highlight-symbol/ is what you are looking for:

这篇关于如何突出显示 Emacs 缓冲区中出现的所有单词?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-03-27 11:36:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/690035.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:单词   区中   Emacs

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!