neoclide / coc-highlight

Document highlight and document colors LSP support for coc.nvim
226 stars 12 forks source link

Highlight more than just one symbol/word like in VS Code #39

Closed void-m4110c closed 4 years ago

void-m4110c commented 4 years ago

In VSCode you can select any text and all occurrences are highlighted, not just one symbol/word. For example if I select this whole string in visual mode:

document.querySelector('.message').textContent

only the word under the cursor will be highlighted (i.e. max one of the four words), but not the whole string.

Is it possible to implement this behaviour? It helps when refactoring, because it shows you duplicate code.

Thanks

chemzqm commented 4 years ago

Use vim's built in search

void-m4110c commented 4 years ago

It's not the same. What a stupid answer. We can auto-highlight one word but can not one WORD? Or a visual selection?

chemzqm commented 4 years ago

Out of scope, you can implement that by simple vim function.

nyngwang commented 3 years ago

It's not the same. What a stupid answer. We can auto-highlight one word but can not one WORD? Or a visual selection?

So why you don't like the built in / in Vim? I do must of the phrase searching using /, it's so simple and does the work when you need it.