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

Minimap: Show Full Document #21849

Closed
rickvanprim opened this issue Mar 3, 2017 · 33 comments · Fixed by #90808
Closed

Minimap: Show Full Document #21849

rickvanprim opened this issue Mar 3, 2017 · 33 comments · Fixed by #90808
Assignees
Labels
editor-minimap Code/Text minimap widget issues feature-request Request for new features or functionality on-testplan
Milestone

Comments

@rickvanprim
Copy link

Love that minimap has been added to VC Code! I'd like to request an option for it to work similar to Visual Studio where it takes up the entire vertical spaces always and does not scroll. I like being able to see/select my absolute position in the document (even if the code is very compressed), as opposed to just having a zoomed out view of the code that doesn't encompass the entire document.

@pankajpatel
Copy link

Sounds good idea. Though the aspect ratio of the minimap will change always on the basis of the number of lines in the file.

This feature should be available as a configurable option for minimap as scrolling or fixed minimap.

@isidorn isidorn assigned alexdima and rebornix and unassigned alexdima Mar 3, 2017
@ialexivy
Copy link

ialexivy commented Mar 4, 2017

Adding comparison image of VSCode minimap vs Visual Studio displaying the same file:

minimap-bug

@alexdima
Copy link
Member

alexdima commented Mar 7, 2017

We have analysed this when implementing the minimap. We've found the Visual Studio approach lacking for large files. At one point, e.g. 2000 lines, Visual Studio height of 1000px, the Visual Studio minimap will render lines by "sampling" (i.e. the height of a line in the minimap would become 0.5px), and at one point the Visual Studio minimap renders only every 2nd line, every 3rd line, etc.

We discussed this in the team and found it to be inferior in this regard. It is of course a very nice solution in the cases where a line height in the minimap is >1px.

@alexdima alexdima added editor-minimap Code/Text minimap widget issues feature-request Request for new features or functionality labels Mar 7, 2017
@rickvanprim
Copy link
Author

You can still make out the shape of the document from the sampling, so I dispute that that makes it not useful. Attached is an example from a 4000 line .cpp file, which still seems pretty readable to me. By contrast I find the scrolling version pretty useless once the document is long enough to scroll due to not being able to know my exact position relative to the entire document. I think I primarily navigate in terms of "roughly 80% through the document" more than code shape, and use code shape once I'm in that area.

capture

@alexdima alexdima added this to the Backlog milestone May 22, 2017
@kkeri
Copy link

kkeri commented Aug 12, 2017

I'm also advocate of full document mode.

Consider that the editor window now displays 3 different mappings of a document:

  • one screen of the document in the main area
  • the full document on the scroll bar
  • a variable part of the document in the minimap.

I loved this feature in VS but the partail view is somewhat confusing for my eyes.

@rebornix rebornix removed their assignment Sep 5, 2017
@alexdima alexdima removed their assignment Nov 24, 2017
@dimitar-asenov
Copy link

+1 for having the full document always in the minimap. As it is, for large documents the "minimap" isn't so much a map, but rather a zoommed out view centered around the currently visible page. It would be really useful to be able to see the entire document and navigate with a single click to interesting locations.

Gutter markers (e.g. changed lines) can then naturally extend to the minimap to make it even easier to recognize locations.

@vobject
Copy link

vobject commented Dec 11, 2017

+1
The full document map from VS is much nicer for navigation.

@bdeeming
Copy link

bdeeming commented Feb 7, 2018

+1 For the full doc.
Right now I often end up clicking multiple times in the 'roughly right absolute position' - a slow process of click - look - not-there-yet - click - look...
For me, I'm just going to turn it off and use the normal scroll bar, since the current setup isn't really providing much value for large files (and small ones I don't need it for).

@RC-1290
Copy link

RC-1290 commented Mar 8, 2018

+1 for full document minimap
I mainly need the minimap for huge files, where the shape, overall color and absolute position helps me quickly jump to sections such as large numbers of enums, strings, and logically related elements that share one type of formatting. And when there's a selected line, a recent change, error or debug break somewhere, I can see it at a glance, and get to it with a single click (and drag to get it at the top or bottom of the screen).

@ahdung
Copy link

ahdung commented Mar 20, 2018

+1
need it.

@gingerbeardman
Copy link

+1

3 similar comments
@tiusnonos
Copy link

+1

@charlesg99
Copy link

+1

@capi1O
Copy link

capi1O commented Aug 3, 2018

+1

@Liques
Copy link

Liques commented Oct 9, 2018

+1 because I felt less productive working in large files using VS Code than with Visual Studio. In the way it is now developed, we have to look twice to the minimap to know which part I am in the code.

@marekvse
Copy link

marekvse commented Nov 22, 2018

+100 for this feature.
I've been waiting so long for somebody responsible to actually realize that it is called a MAP precisely because it is supposed to give you an overview of the WHOLE area.
The shape and coloring of the minimap in VS is definitely still very helpful even for very large files. It seems to me that only a person that has not used a minimap stretching a full document before on in their daily programming could make a conclusion that it is not useful. I understand, that if someone only ever used this kind of minimap then the full stretched minimap may seem strange for the first few moments. But I reckon that if you actually tried using it for a week or two instead of just doing a quick test after ever only working with the "inferior" type, you would never wanna go back. The current type of minimap is nothing more than a fancy, only slightly more helpful scrollbar, NOT a map. Why do I need two vertical scrollbars? I sure would utilize a true mini map A LOT.

You guys that made the conclusion that the VS-type stretched minimap was inferior, tell me.. When you travel to an area, do you prefer to have the map of the whole area, or would you rather travel in the general direction where you wanna go first, having just a piece of the map, then acquire another map for the next part of the area and repeat this process until you finally eventually get where you needed to go, or would you rather have the whole map to start with, being able to determine that you could actually hop on a train to get directly where you need to go much faster?

I really do not understand why this is still being debated and not long implemented. By all means, keep it as a setting for those Sublime users who want to stick with inferior tools, but give the rest of us the other option, please!! Pretty please.

Gutter markers as mentioned? 100% yes. Just watch and learn from the VS minimap. That has been done right!

@charlesg99
Copy link

The original minimap from power tools was/is a must have feature and is the only thing that I truly miss from visual studio. I was thrilled when the "minimap" came out in vscode, but I had to turn it off because it is very confusing and unhelpful.

Please, combine the minimap (full document) and the scrollbar, which already has the colored annotations (only missing breakpoints).

@iqapps
Copy link

iqapps commented Dec 6, 2018

Having a scrolling minimap defeats the entire purpose of a minimap in the first place.

The minimap should therefore be an extension of the scrollbar confined to the visible scrollingbar area.

With the current scrolling minimap, we have a full blown editor view where small part of the file is visible, then a minimap with a indetermined visible area and finally a scrollbar area covering the entire file.

Often you work at the top and the bottom of a code file, because you write various preconditions at the top and new code at the bottom, in which case the minimap does not help at all. I want to click the mouse at the area in the minimap i want to jump to, but to often i cannot do that because that part of the minimap is not in view.

The same goes for a file smaller than the window. The minimap should always follow the scrollbar area to the pixel.

@ltWolfik
Copy link

ltWolfik commented Dec 18, 2018

Not absolutely on a subject, but what about of possibility to represent all indicators (as gutter indicators, bookmarks, current cursor position an so on) on minimap instead of the scrollbar? I am guided often by this indicators, but when it's out of sync with minimap - confusing my mind.

@scottnykl
Copy link

+1 for this feature as well! I disagree with the notion that one must subsample individual lines of a large document. There is a feature in computer graphics called texture mapping which reduces this problem to a convergent geometric series -- simply treat the document as an image... When there are more vertical pixels in the minimap than lines in the file, this transforms to a magnification problem. That is, lines in the file are magnified in the minimap. This is exactly analgous to OpenGL's texture filtering known as texture minification (GL_TEXTURE_MIN_FILTER). The texture minifying function is used whenever the pixel being textured maps to an area greater than one texture element.

Conversely, when there are more lines than vertical pixels, the text lines in the file map to less than one pixel in the minimap. OpenGL calls this a GL_TEXTURE_MAG_FILTER and uses linear interpolation to generate a meaningful visual reference of the file. The texture magnification function is used when the pixel being textured maps to an area less than or equal to one texture element. This is the technique one should implement for large files being viewed in a small minimap.

Even if the VS Code team feels this is inferior to their current default implementation (which I personally disagree), I urge this implementation (MSVC-style behavior) to be made optional).

Thanks

@lxsk
Copy link

lxsk commented May 18, 2019

Ok lately I had to work a bit in vs code (coming from vs2017) and yes this behavior feels like a large productivity decline. I tend to use the minimap a lot for getting a feeling of where I am in the file and to easily jump to another area. And there is the other issue with click/dragging in the minimap.
Actually this bothered me so much, that I cloned the repo and implemented the behavior I would like. (And I normally do not write JS or TypeScript, or more precise I never had to before ... .) Anyway here is what I currently have. :-)
So it is working, look and feel is what I would expect form a minimap. The minimap always shows the entire document and the scrolling behaves exactly like the real scrollbar, so it just feels like an extended scroll bar. And its an option, so the old behavior can be used also. But I had to rewrite a lot of the minimap render code. I will try to finish stuff in the next days if I find time.
minimap

@iqapps
Copy link

iqapps commented May 18, 2019

I'm so looking forward to see your work Alex 😁

@rebornix
Copy link
Member

@lxsk great work, look forward to your pr.

lxsk added a commit to lxsk/vscode that referenced this issue May 27, 2019
fix microsoft#64459: Minimap click and drag
* new option "Minimap: Entire Document"
lxsk added a commit to lxsk/vscode that referenced this issue May 27, 2019
fix microsoft#64459: Minimap click and drag
* new option "Minimap: Entire Document"
@charlesg99
Copy link

@lxsk Is it still in the plans to create a PR for your work on this?

@lxsk
Copy link

lxsk commented Aug 28, 2019

@charlesg99 I thought I did (a while ago) -> #74425

@charlesg99
Copy link

@lxsk Thanks, not sure why this hasn't received attention yet 😢

lxsk pushed a commit to lxsk/vscode that referenced this issue Oct 14, 2019
fix microsoft#64459: Minimap click and drag
* new option "Minimap: Entire Document"
lxsk pushed a commit to lxsk/vscode that referenced this issue Oct 14, 2019
fix microsoft#64459: Minimap click and drag
* new option "Minimap: Entire Document"
@lxsk
Copy link

lxsk commented Oct 14, 2019

image
updated the PR with a less complex and rebased version of the change

lxsk pushed a commit to lxsk/vscode that referenced this issue Oct 14, 2019
fix microsoft#64459: Minimap click and drag
* new option "Minimap: Entire Document"
lxsk pushed a commit to lxsk/vscode that referenced this issue Oct 14, 2019
fix microsoft#64459: Minimap click and drag
* new option "Minimap: Entire Document"
@charlesg99
Copy link

@alexandrudima Can we please have this option looked at/merged? To me this is insane that it isn't yet included in the editor. The search results highlight example posted by @lxsk makes so much sense to me!

The following is the current minimap behavior, I can't believe that some people don't find those visual associations confusing:

image

Looking at this, I'm just thinking "What is going on here?!, why aren't those highlights lined up if they're the same".

lxsk pushed a commit to lxsk/vscode that referenced this issue Oct 28, 2019
fix microsoft#64459: Minimap click and drag
* new option "Minimap: Entire Document"
@hzhangxyz
Copy link

Is there any one know how to let vs minimap be like vscode minimap, fixed height and not show full text?

@alexdima
Copy link
Member

FYI after #91405, the new setting is minimap.size and the values proportional, fit and fill.

@charlesg99
Copy link

@alexdima Just tried the new minimap and I wanted to say Thank you so much! Fantastic work!

@tiusnonos
Copy link

@alexdima Thank you so much for this amazing work on the minimap!!! I was waiting for it a long time ago, it will really increase my productivity!

@github-actions github-actions bot locked and limited conversation to collaborators Apr 2, 2020
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.