Closed mcauley-penney closed 1 year ago
I'm not clear on what you are looking for. For your example, are you saying if you highlight the prefix xxx
in the text xxxyyy
, you want all other instances of xxx
to be highlighted?
Yes. Whatever highlighted in visual mode should be highlighted elsewhere in the buffer, with a means to set how many characters must be highlighted before it starts I think.
That's out of scope for this plugin.
Configuration
I only use the regex provider.
Description
In visual mode, vim-illuminate continues to highlight the word under the cursor. This doesn't make a lot of sense for visual mode, when the user may want to see partial word matches, e.g. where a prefix exists in a string that vim considers an entire word ("xxxyyy" where you want to find all instances of "xxx", for a contrived example). I've read #81 and #141 and, rather than disable the functionality in visual mode, I'd like it to be improved.
Value statement
This feature is a nicety that people who work with data, such as csv, text files, and JSON, may appreciate. I have often wanted this when I wanted to check if a long, human-unreadable string which contained multiple words had matches with other long and unreadable strings in the visible parts of a file.
Precedent
I do not and have never used VSCode other than experimentation, but it allows for highlighting all visually selected matches (see GIF). One Neovim plugin that I know of, aaron-p1/match-visual.nvim, provides similar functionality but, there is no way to turn off vim-illuminate in visual mode, so they conflict. Also, that plugin is fairly new, not popular as of now, and always highlights the match under cursor, effectively overriding the Visual highlight (vim-illuminate allows us to stop this with
under_cursor = false
, which I have in my config).