-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't propagate highlight selections to multiple files. #34
Comments
I see. The Vim plugin you mentioned is based on text matching for highlighting, while MultiHighlight is based on syntax tree element (PSI). Initially, MultiHighlight only highlight identifiers in a single editor, and later added the feature of synchronizing highlights in different editors of the same file. MultiHighlight does not highlight one same identifier in different editors corresponding to different files. This has the advantage of searching within only one file, which makes searching faster. |
If MultiHighlight supports cross-file highlighting, there are several issues to consider:
All of the above points will bring certain performance costs. |
I don't doubt that. It would be a performance hit, however, it would help with multi-file comprehension to see places that the same label is present. |
Another thought on this - The syntax tree vs plaint text match explains why there are cases where this plugin doesn't highlight all instances of a string. |
FWIW I think plain text match across files is by far the more useful feature. I use it in vim for complex refactors where naming conventions change (looking for pattern in different variables), when I want to see references in comments/strings/txt files, when I need my attention to be called to certain usages as I am browsing across files to understand source code, etc. I definitely appreciate the effort but I uninstalled when I realized this didn't highlight across files. The performance hit is a non-concern for me, as it would only happen when I'm using the feature, and the feature is so useful for code comprehension. |
Heh, I saw the above comment pop up in my inbox and immediately thought "must go upvote now!!!"... only to find it was on my own ticket :) |
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.
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.
The text was updated successfully, but these errors were encountered: