microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.34k stars 29.31k forks source link

Minimap - highlight all instances of selected word #84151

Closed stiegi closed 3 years ago

stiegi commented 5 years ago

When you doubleclick and select a word, all instances of this word should be highlighted, not just the selected word itself. Right now you'd have to press CTRL+F and use the search functionality, but the highlighting of other instances should show up in the minimap the moment you selected the word.

Already discussed in #20853

alexdima commented 5 years ago

fyi @RMacfarlane

vscodebot[bot] commented 4 years ago
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our [documentation](https://aka.ms/vscode-issue-lifecycle). Happy Coding!
vscodebot[bot] commented 4 years ago
:slightly_smiling_face: This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our [documentation](https://aka.ms/vscode-issue-lifecycle). Happy Coding!
chavlji commented 4 years ago

It would increase productivity for sure!

engineerbaraazakariya commented 4 years ago

This feature is good and useful but I hope it can be done on all minimaps of splitted views so we can check if a word is in other splitted view or not as we select it in any of views, i.e. I am checking the used/not-used classes, so I open the html file side by side with the scss file to check if a class in css is used in html by selecting and highlighting it in scss file side and then scroll the html for any highlight then the class is used else not used, I am using an extension for this, while if the minimap already show highlights on the other side then there won't be a need to scroll from top to bottom of the all other views for each class. this feature would be very appreciated. Thanks for the great MS.Code I am using it since the beginning

Callendor commented 4 years ago

I would love to see this feature as well.

kennethpdev commented 4 years ago

I just shifted from sublime to vscode, so far all the features I want is still there thanks to plugins. But this one is missing hope to see it soon.

stinos commented 4 years ago

This is the missing feature from the minimap for me, I'm so used to it from Subime Text that I use it often (e.g. for quickly finding references: double-click on word, all occurrences get clearly highlighted in minimap, just scroll). Alternatives for VSCode currently are selecting word then Alt-F3 to select all occurrences of Ctrl-F to seach occurrences, since selections and search results are shown in minimap, but that's extra work. (also, VSCode highlights complete lines instead of matches only, but that's some other issue I think?)

VelocityRa commented 4 years ago

Is this possible in Visual Studio? Any searches I do for it bring up VSCode stuff.

dannyxnda commented 4 years ago

This is a missing feature which I really need. The ruler can show the lines with word match but it is chaotic because the scrollbar's small size contains git status, errors, current line mark, etc... Everyone and I really need this feature I think, and I've been looking forward to this for years.

raphaelquast commented 3 years ago

... any updates on this? is it going to be implemented any time soon?

Goldman90 commented 3 years ago

are there any plans to implement this?

utajum commented 3 years ago

Yeah, cmon dudes, it's been like 4 years

ubyjvovk commented 3 years ago

if you need it today, see https://marketplace.visualstudio.com/items?itemName=mde.select-highlight-minimap

stinos commented 3 years ago

The screenshot shows highlighting in the sidebar though, not the minimap?

Santinell commented 3 years ago

The screenshot shows highlighting in the sidebar though, not the minimap?

Right, this plugin don't show highlighting in minimap, and this is sad ((

utajum commented 3 years ago

Looks like the job was 99% done.

Let's hope it gets merged. 🤞

stiegi commented 3 years ago

Looks like the job was 99% done.

Let's hope it gets merged.

It is incredible that only 6 lines of code were missing! Really hope they will merge this soon!

dannyxnda commented 3 years ago

I saw the pull request was merged to main but still wonder when we can use that. Can't wait to have this feature.

stiegi commented 3 years ago

I saw the pull request was merged to main but still wonder when we can use that. Can't wait to have this feature.

You can already use it in the insiders version. I guess it will be part of their next release, in the beginnig of October. In the Insiders version the color of the markings is a light grey, and you can customize like this:

{
    "workbench.colorCustomizations": {
        "minimap.selectionOccurrenceHighlight": "#008000",

    },
    "editor.minimap.showSlider": "always",
    "editor.minimap.renderCharacters": false 
}
stiegi commented 3 years ago

FYI, it works great in the insiders version, except for html files. In html files, if you mark for example an opening tag, only the closing tag is marked too. If you mark an html attribute, nothing else is highligted in the minimap even if other html tags also do have that attribute. I tested js, ts, tsx, css and vue files - workes great and as expected there. HTML files however - not so good.

alexdima commented 3 years ago

That is because html has semantic highlighting support, which wins over the (weak) built-in textual based highlights. In the case of html, the language has found useful to highlight the matching open-close tags, and not all tags of the same type.

stiegi commented 3 years ago

I understand, thank you for clearifying!