-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Comments
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 |
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. |
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. |
I'm also advocate of full document mode. Consider that the editor window now displays 3 different mappings of a document:
I loved this feature in VS but the partail view is somewhat confusing for my eyes. |
+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. |
+1 |
+1 For the full doc. |
+1 for full document minimap |
+1 |
+1 |
3 similar comments
+1 |
+1 |
+1 |
+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. |
+100 for this feature. 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! |
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). |
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. |
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. |
+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 |
I'm so looking forward to see your work Alex 😁 |
@lxsk great work, look forward to your pr. |
fix microsoft#64459: Minimap click and drag * new option "Minimap: Entire Document"
fix microsoft#64459: Minimap click and drag * new option "Minimap: Entire Document"
@lxsk Is it still in the plans to create a PR for your work on this? |
@charlesg99 I thought I did (a while ago) -> #74425 |
@lxsk Thanks, not sure why this hasn't received attention yet 😢 |
fix microsoft#64459: Minimap click and drag * new option "Minimap: Entire Document"
fix microsoft#64459: Minimap click and drag * new option "Minimap: Entire Document"
fix microsoft#64459: Minimap click and drag * new option "Minimap: Entire Document"
fix microsoft#64459: Minimap click and drag * new option "Minimap: Entire Document"
@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: Looking at this, I'm just thinking "What is going on here?!, why aren't those highlights lined up if they're the same". |
fix microsoft#64459: Minimap click and drag * new option "Minimap: Entire Document"
Is there any one know how to let vs minimap be like vscode minimap, fixed height and not show full text? |
FYI after #91405, the new setting is |
@alexdima Just tried the new minimap and I wanted to say Thank you so much! Fantastic work! |
@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! |
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.
The text was updated successfully, but these errors were encountered: