Code Monkey home page Code Monkey logo

multihighlight's People

Contributors

actions-user avatar huoguangjin avatar johnzeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

multihighlight's Issues

Highlight the Term in all Editor / Split Panels?

Good evening

thank you very much for sharing your great and very useful Plugin!,
it boosts the usability very much 😃

I have a suggestion:
Often it is very helpful to display source code side by side / underneath each other:

image

Therefore my suggestion:

Can you please make MultiHighlight so that terms are highlighted in all editor panels?

Maybe you like the idea but want to make the function adjustable. Then one possibility would be that MultiHighlight offers two IDE commands 😃:

  • MultiHighligh꞉ Toggle Highlight
  • MultiHighligh꞉ Toggle Highlight in all Editor Panels

Thanks a lot, kind regards,
Thomas

IDEA 2024.1 Exception Info

com.intellij.diagnostic.PluginException: ActionUpdateThread.OLD_EDT is deprecated and going to be removed soon. 'com.github.huoguangjin.multihighlight.action.MultiHighlightAction' must override getActionUpdateThread and chose EDT or BGT. See ActionUpdateThread javadoc. [Plugin: MultiHighlight]
at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:90)
at com.intellij.diagnostic.PluginException.reportDeprecatedUsage(PluginException.java:125)
at com.intellij.openapi.actionSystem.ActionUpdateThreadAware.getActionUpdateThread(ActionUpdateThreadAware.java:21)
at com.intellij.openapi.actionSystem.AnAction.getActionUpdateThread(AnAction.java:199)

After upgrade IDEA to 2024.1, use the plugin to highlight words, it works, but will throw that exception message.

目前存在的bug

  1. 切换的颜色不是按配置里面的 ?

jdfw5

  1. 不知道为什么切换不了颜色(有的文件可以有的不行):

jdfw6

Colors don't work for text files

Hi,

This plugin looks very promising but it doesn't work for no-code files, like some txt or log files.

Lets assume I have a file like this:
image

I want to highlight string "cc" in one color and string "dd" in other. So I mark one of "cc" occurrences and press shortcut Ctrl+'. Then I get this result:
image

It looks like regular Find tool. Now I mark "dd" and press Ctrl+' again. I get this:
image

This is just regular Find regexp tool and all matching occurrences are highlighted in the same default green color. For a java file everything works like a charm. Simply I would like to reproduce behavior of Notepad++ (mark some text, not necessarily whole word -> right click -> Style token)

Thanks,
Przemek

Feature request: a keystroke to clear

I've used this plugin for a little while and like it a lot. One small additional feature would be nice - the ability to clear all highlights from the current file. Typically when looking at a problem I add various highlights but when I have fixed the issue and want to look at some other issue I still have the old highlights. I take remove them one by one but this is a bit tedious, so a clear all highlights would be good.

I also changed my colors to avoid red since this leads to confusion in the right hand gutter with syntax errors.

Feature: highlight words in plain text files

How to search words?

  • search by regex (surrounding with \b).

  • search by FindManager.

/**
 * references:
 * {@link com.intellij.openapi.editor.actions.IncrementalFindAction}
 * {@link com.intellij.find.FindManager#findString(CharSequence, int, FindModel, VirtualFile)}
 * {@link com.intellij.find.FindModel#setWholeWordsOnly(boolean)}
 */

How to trigger search?

  • add a additional Action.

  • show additional options in Balloon.

/**
 * references:
 * {@link #com.intellij.refactoring.rename.inplace.InplaceRefactoring#showBalloon()}
 */
  • fallback if highlight PsiElement fails.
/**
 * references:
 * {@link com.intellij.codeInsight.highlighting.HighlightUsagesHandler#handleNoUsageTargets(PsiFile, Editor, SelectionModel, Project)}
 */```

Cycle between highlighted words

The current version does not cycle between highlighted words with F3. IMO this was the case in earlier versions.
It would be nice to make this possible again.

Make highlight active across all open editor tabs/windows

First off, thank you. This was the one feature that kept me did tied to vim. This is really great.

However, in the VIM version (http://vim.wikia.com/wiki/Highlight_multiple_words), the selected highlighting persisted in all views within the same edit session. This allowed you to see all occurrences in all open windows/tabs instantly.

In this version, I need to separately highlight the desired word in each tab/window for different files.
And, when I do, it's in a different color than the same tag in another window.

IMO its preferable to have all editors reflect the highlighted selection.

Still, great plugin. Very much in your debt.

Can't propagate highlight selections to multiple files.

Often one wants to see where a set of variables are used, and this may span multiple files.
If one highlights these in one file, they are not also highlighted in other open files where they occur.

While, true, one can also select and highlight the same strings in the other files, this is time consuming, and they also default to different colors. This detracts from the usefulness of the plugin.

The vim https://vim.fandom.com/wiki/Highlight_multiple_words plugin works this way and is super-useful. I still resort to using vim just for this feature, as there is nothing equivalent any of the jetbrains tools.

image

Even if automatically highlighting in every file is not possible, it would be useful to be able to save the highlight selections from one file and load in another.
eg:
Save the list of highlighted words and their current colors, and load in other files to get matching highlights.

macOS Clion 无法正常使用

操作系统:macOS Big Sur Version 11.6.6
IDE:CLion 2022.1.1 Build #CL-221.5591.52, built on May 11, 2022

通过Market下载安装,显示Installed,但是实际没有成功,keymap中无法看到对应选项。
使用文件导入安装,出现以下错误
Screen Shot 2022-05-24 at 10 13 15

Feature request: Preserve code highlights after closing tabs or restarting IntelliJ

Hi all,

I'd like to propose an enhancement for the plugin. The ability to maintain code highlights even after closing tabs or restarting the IDE would significantly benefit those of us who tackle extensive debugging tasks over multiple sessions.

If there's room for collaboration on this feature, I'd be keen to explore how I could contribute to its development.

Any feedback or thoughts on this would be greatly appreciated. Thanks!

高亮未能区分:大小写+整个单词

例如我高亮A这个字符,但是a和AB和ba都被同时高亮了

能不能加个开关或者加这两个功能:

  1. 区分大小写
  2. 整词匹配

类似IDEA中的搜索栏的 Cc(Match case) 和 W(Words)
image

Incompatible with AndroidStudio 4.2 release build

image

Android Studio 4.2.1
Build #AI-202.7660.26.42.7351085, built on May 10, 2021
Runtime version: 11.0.8+10-b944.6842174 amd64
VM: OpenJDK 64-Bit Server VM by N/A
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 12
Registry: external.system.auto.import.disabled=true, debugger.watches.in.variables=false
Non-Bundled Plugins: BashSupport, PlantUML integration, call-graph, com.intellij.plugins.gnomekeymap, com.intellij.plugins.xwinkeymap, com.intellij.jira, com.vermouthx.idea, org.jetbrains.kotlin, izhangzhihao.rainbow.brackets

Option to select whole words only

Please consider adding option to select only whole words.

For example. I'd like to highlight whole word "request" but not higlight "_dump_request" etc.

Class Foo (request: Bar):
        data = self._dump_request(request)
        json_data = self._json_request(request)
        baz.request = data
        ...

与IdeaVim的EasyMotion一块使用会报错

在用这个插件选中单词之后,再接着使用EasyMotion的查找单词功能,之后MultiHighlight插件就没法正常使用了,偶尔会报错。
异常如下:
java.lang.IllegalArgumentException: Invalid range specified: (-1, -1); at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:231) at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:226) at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:222) at com.intellij.openapi.util.TextRange.<init>(TextRange.java:41) at com.intellij.openapi.util.TextRange.<init>(TextRange.java:30) at com.intellij.openapi.util.TextRange.create(TextRange.java:151) at com.intellij.openapi.util.TextRange.create(TextRange.java:156) at top.rammer.multihighlight.highlight.MultiHighlightHandler.isClearHighlights(MultiHighlightHandler.java:216) at top.rammer.multihighlight.highlight.MultiHighlightHandler.findSymbols(MultiHighlightHandler.java:107) at top.rammer.multihighlight.highlight.MultiHighlightHandler.lambda$invoke$0(MultiHighlightHandler.java:83) at com.intellij.openapi.project.DumbService.withAlternativeResolveEnabled(DumbService.java:353) at top.rammer.multihighlight.highlight.MultiHighlightHandler.invoke(MultiHighlightHandler.java:82) at top.rammer.multihighlight.action.MultiHighlightAction.lambda$actionPerformed$0(MultiHighlightAction.java:40) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:174) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:164) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:150) at top.rammer.multihighlight.action.MultiHighlightAction.actionPerformed(MultiHighlightAction.java:38) at com.intellij.openapi.keymap.impl.ActionProcessor.performAction(ActionProcessor.java:65) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:573) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$doPerformActionInner$10(IdeKeyEventDispatcher.java:706) at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:260) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.doPerformActionInner(IdeKeyEventDispatcher.java:702) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:645) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:584) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:467) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:456) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:224) at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:804) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:754) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:498) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

同一段方法下,不同位置的词,高亮处理不一致

sorry,英语表达不太好,感觉不太好描述
image
比如这个地方,有三个param值,但是选择第一个高亮,后面两个没有被染色。

但是如果选后面两个值高亮处理,三个地方都会被成功染色,如下
image

是因为用的idea本身的高亮逻辑吗,我看现在表现出来的处理方式跟idea光标所在单词加背景色的逻辑似乎是一样的。

Not on yaml

Confirmed it's not a plugin keymap conflict.

Cmd-' works for all file types except yaml.

Version: 1.0.1, pycharm 2018.1

Conflict with another plugin.

I installed plugin named AceJump, and currently update it and upgrade IDEA to the below version:

IntelliJ IDEA version: 2017.3.4, IU-173.4548.28, built on January 30, 2018
AceJump version: 3.4.2

I found the confliction:
active AceJump mode action will remove all highlights in current editor.
It seems that AceJump will remove all highlighters when exiting AceJump mode.

Getting exceptions on IntelliJ IDEA 2023.2.5

Build #IU-232.10227.8, built on November 8, 2023

image

com.intellij.diagnostic.PluginException: 754 ms to call on BGT precache-slow-data@MultiHighlightAction#update@keyboard shortcut (com.github.huoguangjin.multihighlight.action.MultiHighlightAction). Revise AnAction.getActionUpdateThread property [Plugin: MultiHighlight]
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:89)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.logTimeProblemForPreCached(ActionUpdater.java:496)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.ensureSlowDataKeysPreCached(ActionUpdater.java:490)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$callAction$6(ActionUpdater.java:210)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1133)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:210)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:170)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.updateActionReal(ActionUpdater.java:146)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$new$0(ActionUpdater.java:132)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.update(ActionUpdater.java:725)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$UpdateSessionImpl.presentation(ActionUpdater.java:828)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.doUpdateActionsInner(IdeKeyEventDispatcher.kt:832)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.access$doUpdateActionsInner(IdeKeyEventDispatcher.kt:1)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$processAction$chosenPair$1$chosen$2.invoke(IdeKeyEventDispatcher.kt:557)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$processAction$chosenPair$1$chosen$2.invoke(IdeKeyEventDispatcher.kt:548)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction$lambda$3$lambda$2(IdeKeyEventDispatcher.kt:556)
	at com.intellij.openapi.actionSystem.impl.Utils.lambda$runUpdateSessionForInputEvent$15(Utils.java:804)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1133)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$tryRunReadActionAndCancelBeforeWrite$19(ActionUpdater.java:435)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:133)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.tryRunReadActionAndCancelBeforeWrite(ActionUpdater.java:431)
	at com.intellij.openapi.actionSystem.impl.Utils.lambda$runUpdateSessionForInputEvent$16(Utils.java:804)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
	at com.intellij.openapi.actionSystem.impl.Utils.lambda$runUpdateSessionForInputEvent$18(Utils.java:811)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.openapi.actionSystem.impl.Utils.lambda$runUpdateSessionForInputEvent$20(Utils.java:810)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:249)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:227)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:215)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:840)

'null' highlighted in c# files in Rider

When pressing the MultiHighlight hotkey...

A) C# file in Rider:

  • First press: the word null is highlighted instead of my selected word.
  • Second press: my selected word is also highlighted.
  • Third press: null is un-highlighted.
  • Fourth press: my selected word is un-highlighted.
  • Fifth press: (cycle repeats with different colours)

rider

B) C# (or other) file in IntelliJ, or a non-C# file in Rider:

  • First press: my selected word is highlighted.
  • Second press: my selected word is un-highlighted.
  • Third press: (cycle repeats with different colours)

intelliJ

Expected behaviour is (B), not (A)

Using Rider v2021.3.2, MultiHighlight v2.1.1

IDE fatal errors on 2020.3

Seems to work once on each IDE restart, then after that I start seeing these:

java.lang.NoSuchMethodError: 'com.intellij.openapi.util.Couple com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.getUsages(com.intellij.psi.PsiFile, com.intellij.model.Symbol)'
	at top.rammer.multihighlight.highlight.MultiHighlightHandler.findSymbols(MultiHighlightHandler.java:109)
	at top.rammer.multihighlight.highlight.MultiHighlightHandler.lambda$invoke$0(MultiHighlightHandler.java:82)
	at com.intellij.openapi.project.DumbService.withAlternativeResolveEnabled(DumbService.java:337)
	at top.rammer.multihighlight.highlight.MultiHighlightHandler.invoke(MultiHighlightHandler.java:81)
	at top.rammer.multihighlight.action.MultiHighlightAction.lambda$actionPerformed$0(MultiHighlightAction.java:40)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:220)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:177)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:167)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:153)
	at top.rammer.multihighlight.action.MultiHighlightAction.actionPerformed(MultiHighlightAction.java:38)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:281)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:615)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$processAction$3(IdeKeyEventDispatcher.java:675)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:95)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:674)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:625)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:522)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:476)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:225)
	at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:892)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:837)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:454)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:453)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:507)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
IntelliJ IDEA 2020.3 (Ultimate Edition)
Build #IU-203.5981.155, built on November 30, 2020
Licensed to Roche ltd / Bruce Edge
Subscription is active until November 20, 2021
Runtime version: 11.0.9+11-b1145.21 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Jenkins Plugin 0.13.10-2020.3
macOS 10.15.7
GC: ParNew, ConcurrentMarkSweep
Memory: 4029M
Cores: 8
Registry: ide.balloon.shadow.size=0
Non-Bundled Plugins: Key Promoter X, MultiHighlight, PlantUML integration, Quick Notes, awesome.console, color.scheme.GapStyle, com.alayouni.ansiHighlight, com.clutcher.comments_highlighter, com.crunch42.openapi, com.intellij.ideolog, com.mallowigi, com.markskelton.one-dark-theme, io.github.qeesung.component.HighlightBracketPair, net.seesharpsoft.intellij.plugins.csv, net.vektah.codeglance, org.intellij.plugins.hcl, org.zalando.intellij.swagger, tech.central.ai.awstail, DBN, zielu.gittoolbox, GrepConsole, Jenkins Control Plugin, String Manipulation, io.thundra.debugger, wide-task-browser, MavenRunHelper, com.chrisrm.idea.MaterialThemeUI, izhangzhihao.rainbow.brackets, pro.bashsupport, Pythonid, aws.toolkit, ru.adelf.idea.dotenv, org.asciidoctor.intellij.asciidoc


Not highlighting all matches, plus stack trace on some files

Here's an example:

ss-2021-20-02_10 20 15

Both local and name were selected, and are not highlighted in the subsequent occurrences.

While I can highlight the other occurrences manually, they are seen as different values as they are in a different color:

Screen Shot 2021-08-02 at 10 23 37

FWIW, these are .tf terraform files.

I'm using version 2.2.0 of the plugin on Intellij:

IntelliJ IDEA 2021.1.2 RC (Ultimate Edition)
Build #IU-211.7442.27, built on May 24, 2021
Runtime version: 11.0.11+9-b1341.57 x86_64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.7
GC: G1 Young Generation, G1 Old Generation
Memory: 2038M
Cores: 16
Registry: ide.new.stripes.ui=true, debugger.watches.in.variables=false, ide.balloon.shadow.size=0
Non-Bundled Plugins: Key Promoter X (2021.1.1), MultiHighlight (2.2.0), awesome.console (0.1337.11), com.alayouni.ansiHighlight (1.2.4), com.drinchev.projectlabel (1.0), com.github.mikesafonov.jenkins-linter-idea-plugin (0.5.1), DBN (3.2.4501.0), com.jetbrains.plugins.ini4idea (211.6693.44), com.mallowigi (36.0), dev.meanmail.plugin.nginx-intellij-plugin (2021.2-211), net.sjrx.intellij.plugins.systemdunitfiles (0.3.3), org.intellij.plugins.hcl (0.7.10), mobi.hsz.idea.gitignore (4.1.0), name.kropp.intellij.makefile (211.6693.108), org.yapal.world.commandlinelauncher (2.1.0), ir.msdehghan.plugins.ansible (0.92), org.logtalk (1.0.15), com.perl5 (2021.1.3), pro.bashsupport (2.0.3.211), org.jetbrains.kotlin (211-1.5.21-release-317-IJ7442.40), com.chrisrm.idea.MaterialThemeUI (6.7.2), com.clutcher.comments_highlighter (2.3), org.jetbrains.plugins.ruby (211.7442.9), PlantUML integration (5.5.1), Pythonid (211.7442.45), aws.toolkit (1.29-211), com.intellij.bigdatatools (211.7142.49), ru.adelf.idea.dotenv (2021.2), org.asciidoctor.intellij.asciidoc (0.33.6), org.toml.lang (0.2.152.4026-211)
Kotlin: 211-1.5.21-release-317-IJ7442.40

Here's a stack trace I saw in the idea.log when trying to highlight an unselected word that the cursor was on:


2021-08-02 10:30:07,791 [53961569]  ERROR - pplication.impl.LaterInvocator - Invalid range specified: (-1, -1);
java.lang.IllegalArgumentException: Invalid range specified: (-1, -1);
        at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:222)
        at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:217)
        at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:213)
        at com.intellij.openapi.util.TextRange.<init>(TextRange.java:41)
        at com.intellij.openapi.util.TextRange.<init>(TextRange.java:30)
        at com.intellij.openapi.util.TextRange.create(TextRange.java:148)
        at com.intellij.openapi.util.TextRange.create(TextRange.java:153)
        at top.rammer.multihighlight.highlight.MultiHighlightHandler.isClearHighlights(MultiHighlightHandler.java:248)
        at top.rammer.multihighlight.highlight.MultiHighlightHandler.findSymbols(MultiHighlightHandler.java:139)
        at top.rammer.multihighlight.highlight.MultiHighlightHandler.lambda$invoke$0(MultiHighlightHandler.java:109)
        at com.intellij.openapi.project.DumbService.withAlternativeResolveEnabled(DumbService.java:339)
        at top.rammer.multihighlight.highlight.MultiHighlightHandler.invoke(MultiHighlightHandler.java:108)
        at top.rammer.multihighlight.action.MultiHighlightAction.lambda$actionPerformed$0(MultiHighlightAction.java:40)
        at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:216)
        at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:172)
        at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:162)
        at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:148)
        at top.rammer.multihighlight.action.MultiHighlightAction.actionPerformed(MultiHighlightAction.java:38)
        at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAware$5(ActionUtil.java:273)
        at com.intellij.util.SlowOperations.lambda$allowSlowOperations$0(SlowOperations.java:77)
        at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:64)
        at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:76)
        at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:273)
        at com.intellij.ide.actions.GotoActionAction.lambda$performAction$2(GotoActionAction.java:108)
        at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:218)
        at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
        at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:200)
        at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781)
        at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:319)
        at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:84)
        at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:133)
        at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:46)
        at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:189)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
        at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:969)
        at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:839)
        at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:449)
        at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:808)
        at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
        at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781)
        at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:496)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
2021-08-02 10:30:07,792 [53961570]  ERROR - pplication.impl.LaterInvocator - IntelliJ IDEA 2021.1.2 RC  Build #IU-211.7442.27
2021-08-02 10:30:07,792 [53961570]  ERROR - pplication.impl.LaterInvocator - JDK: 11.0.11; VM: Dynamic Code Evolution 64-Bit Server VM; Vendor: JetBrains s.r.o.
2021-08-02 10:30:07,792 [53961570]  ERROR - pplication.impl.LaterInvocator - OS: Mac OS X
2021-08-02 10:30:07,792 [53961570]  ERROR - pplication.impl.LaterInvocator - Plugin to blame: MultiHighlight version: 2.2.0
2021-08-02 10:30:07,792 [53961570]  ERROR - pplication.impl.LaterInvocator - Last Action: MultiHighlight

Tried again with the word selected and looks like the identical trace.

Note: these were the same words that did work, at least to highlight the one instance in the screenshot.

The only action I took between the included screenshots and the stack traces was popping in and out of settings to get version data for this ticket.

Note also that the strings are no longer being highlighted at all. This happens periodically as well. I thought it was a file type dependency, but that appears not to be the case as the screenshots I just took at least highlighted something.

Please let me know if there's any other data I can provide

An option to disable changes to font style or font weight

Hello @huoguangjin,

Thank you very much for this plugin. It works really great.

Is it possible to add an option to configuration to highlight words with just color and keep font style and font weight the way it is displayed by IDE?

See the image bellow. By default IDE displays the keyword 'function' in bold and the function name in italic. But if I hightlight the word 'function', its font weight and style changes along with color.

image

I' like to change the color and keep everything else.

Choose a color on highlight

Hi!
Is there a possibility for feature to simply choose the highlight color on highlighting?

I have a vague idea how this could work. On keybinding( probably new one like cmd+\ ), you would get a popup with a list of available colors ordered as in settings and you could use additional keystroke like a number from 1-9 to select a color from keyboard or simply just select with mouse.

It would be super useful because sometimes I want to split my code into 2 or 3 parts and it's hard to do with cycling colors.

IDEA 2020.2 Beta 中出现异常

IDEA 2020.2 Beta 中出现异常,这个应该是设置。但高亮效果也不工作。

cannot create configurable component

java.lang.IllegalArgumentException: Argument for @NotNull parameter 'project' of com/intellij/codeInsight/daemon/impl/TrafficLightRenderer.<init> must not be null
	at com.intellij.codeInsight.daemon.impl.TrafficLightRenderer.$$$reportNull$$$0(TrafficLightRenderer.java)
	at com.intellij.codeInsight.daemon.impl.TrafficLightRenderer.<init>(TrafficLightRenderer.java)
	at com.intellij.codeInsight.daemon.impl.TrafficLightRenderer.<init>(TrafficLightRenderer.java:85)
	at top.rammer.multihighlight.ui.ColorPreviewPanel$1.<init>(ColorPreviewPanel.java:52)
	at top.rammer.multihighlight.ui.ColorPreviewPanel.<init>(ColorPreviewPanel.java:52)
	at top.rammer.multihighlight.ui.MultiHighlightConfigPanel.createPanel(MultiHighlightConfigPanel.java:59)
	at top.rammer.multihighlight.ui.MultiHighlightConfigPanel.createComponent(MultiHighlightConfigPanel.java:189)
	at com.intellij.openapi.options.ex.ConfigurableWrapper.createComponent(ConfigurableWrapper.java:172)
	at com.intellij.openapi.options.ex.ConfigurableCardPanel.lambda$createConfigurableComponent$4(ConfigurableCardPanel.java:115)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:865)
	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:61)
	at com.intellij.openapi.options.ex.ConfigurableCardPanel.createConfigurableComponent(ConfigurableCardPanel.java:111)
	at com.intellij.openapi.options.ex.ConfigurableCardPanel.create(ConfigurableCardPanel.java:59)

Make highlight case sensitive

Please consider making highlight case sensitive.

foo and Foo in python are not the same things.

For example. I'd like to highlight custom class "Request". I've got only a couple of this word in my code. But when I try to do so, MultiHighlight highlight "request" word also. So, I get hundred highlighted words Request/request instead of two.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.