Eclipse 突出显示相同出现的单词 [英] Eclipse highlighting the same occurrence of the word

查看:14
本文介绍了Eclipse 突出显示相同出现的单词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Notepad++ 中,它有一个非常好的功能,如果我选择一个单词,它将突出显示整个文本中所有相同的单词.除此之外,我可以设置热键以突出显示多达五个不同样式的不同单词(见下图效果).

In Notepad++ , it has a very nice feature that if I select a word , it will highlight all the same words throughout the text . Added to this , I can set the hot-keys to highlight up to five different words with different styles (See the effect below) .

有什么方法可以在 eclipse 中获得类似的效果吗?我知道在编辑 Java 时,它会突出显示所有相同的变量,但是当我突出显示注释和编辑其他文件类型(例如 xml、html、js、css 等)时,它将不起作用.

Is there any ways /plug-ins to get this similar effect in eclipse ? I know when editing Java , it will highlight all the same variables ,but it will not work when I highlight the comments and editing other files type (e.g. xml, html, js, css and etc).

推荐答案

我使用 Eclipse 已经有一段时间了,我很确定没有规范的方法可以做到这一点.

I've been working with Eclipse for quite a while and I'm pretty certain that there is no canonical way of doing this.

在 Eclipse 中,这些东西是在每个编辑器的基础上管理的,Java 编辑器不支持我所知道的所有内容.至少对于 Java 编辑器,您可以对突出显示的内容和方式(Preferences > Java > Editor > Mark Occurrences)进行一些小的配置,但我想您已经知道了.

In Eclipse these things are managed on a per-editor basis and the Java editor does not support what your looking for for all I know. At least for the Java editor you can do some minor configuration in what is highlighted and how (Preferences > Java > Editor > Mark Occurrences), but I guess you already know that.

至于插件,我不知道有任何插件可以实现您的需求.事实上,如果真的有一个插件可以实现您的需求,我会感到惊讶.

As for plugins, I'm not aware of any plugin that achieves what you're looking for. As a matter of fact I'd be surprised if there really was a plugin which achieves what you're looking for.

如果出现问题,我非常感谢您在这里分享它,多年来我一直试图在 Eclipse 中获得体面的高亮显示,但没有成功...... :)

If something comes up I'd much appreciate you sharing it here, I've been trying to get decent highlighting into Eclipse for years unsuccessfully... :)

这篇关于Eclipse 突出显示相同出现的单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆