I'm using Visual Studio Code with two windows (panes) side-by-side. To avoid confusion, here is a screenshot:

I'm using "editor.selectionHighlight": true, which you can see is working in the left (active) window.
A similar solution is proposed in this question with editor.action.selectHighlights, but that works only in the active window. I tried searching but all my searches resulted in what I'm already using.
When I was using Atom, I was using a "Highlight Selection" plugin which highlighted matches from all open windows.
Is there a way, either native (preferred) or via an extension, to make selection highlighting work in all open windows?
It looks like the highlight (not select) functionality shown below will be released in Stable v1.84 early December 2023 as under this setting:
Editor: Occurrences Highlight
Controls whether occurrences should be highlighted across files.
Options:
offsingleFile - current file onlymultiFile - across all valid open filesWork has begun and can be tested on this feature in the Insiders Build v1.84. The currently experimental feature will highlight the occurrences of a word found in all visible editors (in my early testing). From Test: Multi Editor/Model Highlighting
You must enable this setting:
Editor: Multi Document Occurrences Highlight
> Experimental: Controls whether the editor should highlight word
> occurrences across multiple open editors
Note
This initial implementation features only textual occurrences, with support for semantic highlighting coming in the future.
Here is a demo with three different files in three editor groups. You see you don't have to select the words, just click on them.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With