Skip to content
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

Highlight selected text is not applied to all opened files #30014

Closed
aviadb opened this issue Jul 2, 2017 · 33 comments · Fixed by #196024
Closed

Highlight selected text is not applied to all opened files #30014

aviadb opened this issue Jul 2, 2017 · 33 comments · Fixed by #196024
Assignees
Labels
editor-contrib Editor collection of extras feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan
Milestone

Comments

@aviadb
Copy link

aviadb commented Jul 2, 2017

  • VSCode Version: 1.14.0
  • OS Version: Windows 10

Selecting text for highlight(either by marking it or by double clicking) highlight the selected text only in selected opened file but not in all opened files in other panels.
In addition, the highlight marker is not visible in map preview.

@alexdima alexdima added feature-request Request for new features or functionality editor-contrib Editor collection of extras and removed new release labels Jul 3, 2017
@alexdima alexdima removed their assignment Jul 3, 2017
@aviadb
Copy link
Author

aviadb commented Aug 30, 2017

Almost 2 month has passed since,
without any progress.

@kenijo
Copy link

kenijo commented Nov 18, 2017

I am definitely in favor of this feature which I am used to with Notepad++ (which they call Smart Highlighting In All Views). To help people understand, here are a couple of screenshots:

Current behavior when highlighting the word "car" in the left view (matches are highlighted only in the left)
image 2

Expected behavior when highlighting the word "car" in the left view (matches are highlighted in both views)
image 3

@kai6novice
Copy link

This is exactly the feature I am looking for. When I almost submitted a feature suggestion, I found this. It has been almost 2 years.

@begin-again
Copy link

Are there any plugins which support this behaviour?

@kenijo
Copy link

kenijo commented Sep 23, 2019

Here are a few plugins that do the highlight of all occurrences of a word within a single document. I requested to all the developer to add the ability to highlight across multiple views.
Feel free to go in and +1 the feature to motivate them to develop the feature.

https://github.com/ryu1kn/vscode-text-marker
https://github.com/rsbondi/highlight-words
https://github.com/cliffordfajardo/highlight-selections-vscode
https://github.com/EsIce/highlight-icemode

@rebornix rebornix added this to the Backlog milestone Oct 24, 2019
@Reliquat
Copy link

Here are a few plugins that do the highlight of all occurrences of a word within a single document. I requested to all the developer to add the ability to highlight across multiple views.
Feel free to go in and +1 the feature to motivate them to develop the feature.

https://github.com/ryu1kn/vscode-text-marker
https://github.com/rsbondi/highlight-words
https://github.com/cliffordfajardo/highlight-selections-vscode
https://github.com/EsIce/highlight-icemode

@cliffordfajardo added the feature to his plugin : https://github.com/cliffordfajardo/highlight-selections-vscode#multi-tab-support

@kenijo
Copy link

kenijo commented Dec 13, 2019

@xucongli1989 also added the feature to his plugin : https://github.com/xucongli1989/highlight-icemode

@ctf0
Copy link

ctf0 commented Dec 13, 2019

ryu1kn/vscode-text-marker#44 with correct behavior, waiting for merge

@mmoanis
Copy link

mmoanis commented Mar 8, 2021

2021 and still not addressed 😢

Please let us know the plans on this

@karthik-k-r
Copy link

Team / @rebornix @alexdima @kieferrm, can you please consider this request, it has been in open state for years with quite a good number of upvotes..

@spantosoft
Copy link

This is a must. I'm new with vscode, but I came from Atom and this is a time saving feature, specially when working with multiple monitors and multiple views.

@Kochise
Copy link

Kochise commented Dec 10, 2021

#87274

@mmoanis
Copy link

mmoanis commented Jan 13, 2022

2022 and counting 😢

@KSpakes87
Copy link

June 2022 and this still isn't a feature. This is a must if you are going kill off Atom now. At least make your text editor better before forcing many people to switch.

@spantosoft
Copy link

Upgraded to 1.68.1 but it still doesn't work for me.

Are you using an extension to make it work? which one?

Thanks!

@begin-again
Copy link

Upgraded to 1.68.1 but it still doesn't work for me.

Are you using an extension to make it work? which one?

Thanks!

Yeah my bad, I did have an extension doing this. It's "highlight-icemode-select"

@KSpakes87
Copy link

Upgraded to 1.68.1 but it still doesn't work for me.
Are you using an extension to make it work? which one?
Thanks!

Yeah my bad, I did have an extension doing this. It's "highlight-icemode-select"

That does mostly what I want. Was able to change the background color to make it "none".

One thing that I still don't like is, if you select the word "for", it will catch all the words, but it will also highlight the word "for" inside of "format". Atom didn't have this problem. It would highlight everything that matched exactly what was selected.

@KSpakes87
Copy link

UPDATE:

With begin-again's highlight-icemode-select extension suggestion plus adjusting the background color, and selecting "Match Whole Words" in the Find pane (CTRL + F), it gives the desired function.

Add the following to your settings.json after installing the extension above to remove the background color.

"highlight-icemode.backgroundColor": ""

@KSpakes87
Copy link

@kenijo You can press CTRL+F (CMD+F for Mac) and there is a button you can click in the Find pane that defaults the highlights to "Whole Word Selection". This makes it function for the double-click as well. Only issue I could really see is if you want to do a search for a variable or something that you don't remember the entire name of. In that case you can just switch back temporarily to search for it.

@kenijo
Copy link

kenijo commented Jun 17, 2022

Thanks, that's a good alternative. The one thing I don't like about highlight-icemode-select is that it highlights even on multiline selections. I wish that could be disabled (it is distracting).

I'll stay with (multiwindows-highlight)[https://github.com/aki12n/multiwindows-highlight] for now

@spantosoft
Copy link

Thank you all! highlight-icemode-select does exactly what I need!

The thing I miss now is the minimap doing the same, showing selections in multiple views... anyway the icemode extension is a big step.

@kenijo
Copy link

kenijo commented Jun 18, 2022

Here you go: select-highlight-minimap

@cdmihai
Copy link

cdmihai commented Jun 25, 2022

Many times the same entity is referenced in multiple files (like json/yaml key names, recurring data/logs, global vars), so having this would help a lot.

@jheller
Copy link

jheller commented Nov 29, 2022

I am coming from Atom too (reluctantly - thanks Microsoft!) and this is something that has stopped me switching to VSC in the past. Highlight-icemode looks good, but is there a way to get the selected word highlighted in the minimap as well? There are marks in the minimap border, but they don't line up. I can't make any sense of them. I used this feature in Atom constantly to see quickly where else the selected word is from the minimap.

@kenijo
Copy link

kenijo commented Nov 29, 2022

I wish this was there too. There are a few enhancement requests on the VSCode GitHub related to this but so far I haven't seen anything come to fruition.
The closest feature to this is a highlight happening on the scrollbar, but I don't find it practical.

@electrovir
Copy link

electrovir commented Dec 21, 2022

Just came across this and the above mentioned highlight-icemode-select extension is accomplishing this feature perfectly for me.

@jheller
Copy link

jheller commented Dec 21, 2022

On my instance, highlight-icemode-select does not highlight the word in the minimap. Am I missing something?

@electrovir
Copy link

On my instance, highlight-icemode-select does not highlight the word in the minimap. Am I missing something?

Sorry @jheller I meant that highlight-icemode-select is solving the "Highlight selected text is not applied to all opened files" problem perfectly. I can't say anything about the mini-map part as I don't use those, sorry!

@ctf0
Copy link

ctf0 commented Apr 15, 2023

i made something that might help with this one https://marketplace.visualstudio.com/items?itemName=ctf0.cross-editors-selections

@jheller
Copy link

jheller commented Apr 18, 2023

The cross-editors-selections extension is a start in the right direction, but it only highlights the selected text in the minimap. I have another extension that highlights all occurences of the selected text in the editor, and I would like to see that reflected in the minimap. Atom was able to do this so well, and it's the feature I miss most.

@ctf0
Copy link

ctf0 commented Apr 18, 2023

but it only highlights the selected text in the minimap

it really depends on your editor configuration, ex."editor.hideCursorInOverviewRuler": false, again the extension does nothing outside the usual editor behavior, so i would recommend to disable any selection modifier/highlighter extensions & see if the editor behave as you expect.

@jheller
Copy link

jheller commented Apr 18, 2023

OK. I removed the highlight-icemode extension I was using. Now in the editor it only highlights the selection, not other occurences of it in the editor. And the minimap just shows the selection - and that is barely visible.
Here is what I would like to see. This image is from the Atom package minimap-highlight-selected, which worked in conjunction with the highlight-selected package. When a word is selected it shows (very clearly) all occurences of it in the editor and in the minimap. I found it extremely useful. image

@ctf0
Copy link

ctf0 commented Apr 18, 2023

Now in the editor it only highlights the selection, not other occurrences of it in the editor

this depends on your editor configuration, maybe you got used to a selection modifier made by other extensions, but this outside the extension scope.

And the minimap just shows the selection - and that is barely visible

plz check the editor minimap settings

When a word is selected it shows (very clearly) all occurences of it in the editor and in the minimap. I found it extremely useful.

the extension i made is not for this usage, plz check the readme

@Yoyokrazy Yoyokrazy self-assigned this Oct 19, 2023
@vscodenpa vscodenpa added the unreleased Patch has not yet been released in VS Code Insiders label Oct 24, 2023
@vscodenpa vscodenpa added on-testplan insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Oct 24, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-contrib Editor collection of extras feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan
Projects
None yet
Development

Successfully merging a pull request may close this issue.