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

Enhancement: Minimap position highlight #21404

Closed
2 of 3 tasks
ghiscoding opened this issue Feb 25, 2017 · 59 comments · Fixed by microsoft/azuredatastudio#7206
Closed
2 of 3 tasks

Enhancement: Minimap position highlight #21404

ghiscoding opened this issue Feb 25, 2017 · 59 comments · Fixed by microsoft/azuredatastudio#7206
Labels
editor-minimap Code/Text minimap widget issues feature-request Request for new features or functionality on-testplan
Milestone

Comments

@ghiscoding
Copy link

ghiscoding commented Feb 25, 2017

  • VSCode Version: 1.10.0-insiders (2017-02-24)
  • OS Version: Windows 10

I have some enhancement requests for the current minimap implementation which are already available in Atom as separate plugins.

  1. 1. Enable the minimap in latest insider build and position your cursor in the editor. The minimap does not highlight (ligh grey background) your current position unless you hover over the minimap. I would like this highlight to be enabled at all time.
  2. 2. Add CSS color display in the minimap, this is available in Atom as a separate plugin minimap-pigments which I find very convenient.
  3. 3. Highlight the text in the editor would also highlight the text in the minimap. This is only available in Sublime Text and has a white background (instead of grey)... see print screen.

atom_minimap

@mika76
Copy link

mika76 commented Feb 25, 2017

I think 3 is the one I mostly use - so easy to find or find and replace when you can see the highlights in the minimap - as long as they are very visible (strong contrast) - in atom and sublime the highlights are not nearly as visible as they should be, it's too easy to miss them in the syntax colors...

@alexdima alexdima added editor-minimap Code/Text minimap widget issues feature-request Request for new features or functionality labels Feb 27, 2017
@alexdima alexdima added this to the Backlog milestone Feb 27, 2017
@sillero
Copy link

sillero commented Mar 1, 2017

if minimap is enabled AND with the behavior fixed as @ghiscoding suggested, we don't need that slim default bar, minimap replaces it

@rmunn
Copy link
Contributor

rmunn commented Mar 9, 2017

Request 1 (always show the viewport on the minimap) is now being tracked at #21784. Request 3 seems to be a partial duplicate of #20934 ("editor selection" is one of the things asked for in that issue). Request 2 does not have any duplicates that I could find.

@jens1o
Copy link
Contributor

jens1o commented Mar 14, 2017

I would like it when the current line is also highlighted in the minimap.

@globaltommy
Copy link

I'm very surprised there is no highlight on minimap - guess will STILL stick with atom.io for now.

@abhijitvalluri
Copy link

Request 3 is a feature that exists in Atom, at least via third-party packages. In my opinion, that is very much needed and without that the utility of the minimap is questionable at best. Hopefully they will implement this feature soon.

In the meantime, I'll still be sticking with VScode instead of atom as I totally love the git integration in VScode, including the diff feature and due to the search feature being in the sidebar rather than editor window.

@abhijitvalluri
Copy link

I quickly hacked together a rudimentary implementation of Request 1 and 3 at abhijitvalluri@a1f2d2f

For request 3, I couldn't yet figure out how to highlight just the precise token corresponding to the word that is highlighted. So, instead I decided to highlight the entire line. In my opinion, this is probably a bit better as it is easier to see the whole line light up instead of just the word, which will be much smaller and harder to spot.

Example screenshot:
vscode_enhanced

You could take that code, modify it and make your own custom version of vscode. And if you can make it nicer still go ahead and send in a PR!

@abhijitvalluri
Copy link

abhijitvalluri commented Apr 17, 2017

Made some improvements to the minimap highlight implementation: https://github.com/abhijitvalluri/vscode/commits/minimap_enhancements

Right now, all the implementation details are hardcoded, including it being set up for a dark theme. Also, there is a bug wherein if the file is too large, so that the minimap scrolls and does not fit entirely in one view, then only highlights for the portion of the file that is visible in the minimap works. Once you scroll, there are no highlights for the invisible part of the file in the minimap.
minimap_highlight

UPDATE:
I have made the necessary changes to fix the issues I mentioned above: highlights work correctly even for very long files, scrolling does not remove highlights etc. in abhijitvalluri@46c6691

If you don't mind this hardcoded feature, and are fine with the dark theme, then you can make a packaged version of this by running:

gulp vscode-[platform]-min

And then you will have your very own vscode with highlighting in the minimap. This is good enough for me, for now! So I am using this as my default version of vscode! 🤓

@ghiscoding
Copy link
Author

@alexandrudima do you think it would be possible to use/merge the code provided by @abhijitvalluri for the number 3. that I have in the list

  1. Highlight the text in the editor would also highlight the text in the minimap. This is only available in Sublime Text and has a white background (instead of grey).

@abhijitvalluri
Copy link

My code may not be in a good shape for merging. So, I can clean it up if needed so that these changes can be made use of in vscode! Do let me know.

@ghiscoding
Copy link
Author

ghiscoding commented Jun 8, 2017

The number (1) from the list has now been implemented Minimap: add a alwaysShowViewport setting - 21784. A new setting will available in the June version. "editor.minimap.showSlider": "always"

@amackintosh
Copy link

+1 would like to get Request #3 implemented. Migrated from Atom and finding it horribly inefficient to hav no word highlighting in the minimap.

@phillijw
Copy link

Is there already a ticket for the minimap word highlights? I've seen it mentioned in a few tickets but it was always mixed with other things for the minimap.

@utajum
Copy link
Contributor

utajum commented Aug 16, 2017

I need this too

@ghiscoding
Copy link
Author

Unfortunately, minimap seems to be very low on the priority list (if not forgotten).

@jcramirez
Copy link

Tweeted to Visual Code and we need a bigger push for this feature just fyi

@agm1984
Copy link

agm1984 commented Sep 6, 2017

Someone needs to make a case to the big wigs, because it honestly will improve aggregate employee effectiveness over a known interval of time because all you have to do is double click words and look at the minimap to see if further action is needed.

This increases maximum potential actions over the known interval by minimizing mental and physical boilerplate associated with finding or confirming keyword instances without using the minimap. It is an inversely proportionate relationship. As time spent analyzing increases, file changes per second decreases. Multiply this by the number of Microsoft employees and the cost-benefit ratio warrants the potential gain in sprint velocity.

This upgrade saves unnecessary trips to CTRL+F to iterate through results, and allows you to confirm if keyword placements are present or missing at known locations in the file with an average time-to-completion of 0.5 to 2 seconds with minimap and 5 to 10 seconds with CTRL+F.

@jcramirez
Copy link

Thanks @agm1984. Hopefully, more people will tweet/comment for this feature to make it to next release. Honestly, this is the one feature that keeps me from using VScode as my sole editor, double clicking on a word and seeing it sprinkled throughout the minimap is an amazing thing :)

@abhijitvalluri
Copy link

By the way, I recently looked into rebasing my above hack to enable highlighting for newer builds of vscode. Sadly however, it looks like the underlying code changed by quite a bit and I have not figured out how to redo the same changes on the latest code base. But if it was doable then, it should be doable now, and it OUGHT to be doable by the vscode devs.

@qiushihe
Copy link

qiushihe commented Sep 8, 2017

If the Vote for popular feature requests listing is any indication of how the team prioritize their work then we have much to lament. This issue in particular is currently on the 3rd page, behind popular requests such as Offline spell checker, Transparent window and A portable version of the app.

@abhijitvalluri
Copy link

How is a transparent window more important than this!!? Sheesh, people want eye-candy more than actual features that are useful for productivity! :(

@utajum
Copy link
Contributor

utajum commented Sep 8, 2017

I'm still using Atom even though is painfully slow sometimes, just because I'm so used to minimap highlighting, it saves me a lot of time for analyzing code. Really cant believe that such a basic feature is still not implemented.

@jcramirez
Copy link

@zemzela I'm doing the same thing. I have Atom open and basically using it as my main editor until I need to use the awesome debugger in VS Code. Hopefully if we keep the conversation going on this topic the good peeps at VS Code will give us this much needed feature. Maybe re/tweet them more to show that the community cares about this feature.

@RJSonnenberg
Copy link

This feature would be incredibly useful for me as I work in Haskell and it's really difficult in large files to find all the references. Also, I've heard and seen some people talk about combining the thin scroll bar with the minimap scrollbar, and I think that is a great idea. There is currently a little bit of mismatch between the two and it would be great to unify them.

@omaksi
Copy link

omaksi commented Feb 3, 2019

This feature is super useful when Cmd-D selecting multiple occurences of a word that is scattered across a longer file. Coming from Atom I really miss it in VSCode.

@katespaghetti
Copy link

Looking forward to seeing this in vscode. Just switched over from Sublime and really missing this feature.

@ghiscoding
Copy link
Author

@katespaghetti
The best thing we can do is to vote ⭐️ and hope that this gets higher in their list of popular issues. This issue currently sits in the 3rd page of highest reactions (star), they probably won't take a look at it until it reaches 1st or 2nd page.

@utajum
Copy link
Contributor

utajum commented Feb 26, 2019

Happy Birthday Thread

Happy Birthday, Y'all!
Its my favorite thread 🥇

@andykimchris
Copy link

Is this feature out yet?

@dcastil
Copy link

dcastil commented Jun 11, 2019

I'd like to see the minimap have all the highlighting features of the scrollbar to replace the scrollbar completely. It feels strange and unnecessary to have two scrollbars for the same window.

@ghiscoding
Copy link
Author

I've added a comment in next June 2019 Iteration Plan, you guys can up vote there as well if you wish.

@Matrosskin
Copy link

Here is a link to comment to vote: #75103 (comment)

@mneumark
Copy link

mneumark commented Jul 5, 2019

So....The new version came out. It....sort of has this feature we have been waiting for for 2.5 years. A couple problems:

  1. It only highlights in the minimap if you search the page. Double-clicking on things that highlights other instances of it on the page does not do anything in the minimap.

  2. The highlight is so tiny and subtle it might as well not have been added. Its supposed to highlight in a way that is clear and obvious and instead its so hard to see that in the documentation they had to add a circle around the part of the minimap so people would be able to tell it was there at all.

Any chance these can be fixed in less time than 2.5 years? These seem like pretty simple changes to make.

@ghiscoding
Copy link
Author

ghiscoding commented Jul 9, 2019

Our wishes might have been heard...

🔴 Support multi-line decorations in the minimap @RMacfarlane
🔴 Explore improving presentation of search results in minimap (size, theme color) @RMacfarlane

that was pulled from July Iteration Plan (2019), it does sound like this ticket 🤞

EDIT

Unfortunately, they are actually different issues with similar subject title. I'm afraid that our issue will not be addressed at this time. Sad to see that it takes years to look into this 😿

@stiegi
Copy link

stiegi commented Aug 12, 2019

With the release of 1.37.0 we kind of have that feature now. The only downside is that it doesn't work on simple selections, but on searches only. That means you need to doubleclick first, and press CTRL+F afterwards... We are almost there. Is there a way to automate searching for the selection?

@PierreMarchand20
Copy link

I tried to talk about it in #78807 along another issue which is assigned to the person who implemented the feature for the search selection. Wait and see

@RMacfarlane
Copy link
Contributor

Hey all! I did the work on search results in the minimap, which was the first step of enabling decorations in the minimap. This was meant to be the foundation for further decoration improvements to the minimap. I'm not working on this in the current iteration, but this issue is on my radar!

@ghiscoding
Copy link
Author

@RMacfarlane
This is great news, thanks for the info. We waited 2.5 years, so I'm sure we could wait for another iteration before seeing it implemented. We just hope it will be this year lol

@RMacfarlane
Copy link
Contributor

I've just checked in the change for showing selection decorations in the minimap, it will be available in tomorrow's VSCode Insiders if you want to try it out early, otherwise in our next stable release in October.

@ghiscoding
Copy link
Author

@RMacfarlane
Thanks for the change, this is very welcome change on the productivity side.

Note that I proposed 3 enhancements and now 2/3 are done, we are still missing the "Show Color in Minimap" but it was not as high interested as the other 2 were. You close the issue but I wonder if that would be doable in the future? Should that be a separate issue?

@RMacfarlane
Copy link
Contributor

@ghiscoding Can you open a separate issue to track that?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-minimap Code/Text minimap widget issues feature-request Request for new features or functionality on-testplan
Projects
None yet
Development

Successfully merging a pull request may close this issue.