microsoft / vscode

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

Enhanced Scrollbar (add minimap) #4865

Closed jschraub closed 7 years ago

jschraub commented 8 years ago

Feature Request

Add the Enhanced Scrollbar feature from VS 2013 and VS 2015 into VS Code. It's an extremely efficient way to move around within a file and would be a great feature to have in VS Code.

If this is already an extension or an option, I could not find it.

Devid- commented 7 years ago

This is really what is missing from Visual Studio Code.

gluons commented 7 years ago

@charlesmilette: "Please stop spamming the thread with +1s, FFS. When we follow this issue, we want to get pertinent info about progress on this feature, not get spammed by +1s. Use the thumbs-up reaction on original comment or up vote on UserVoice instead."

Please use 👍 reaction please. Do not comment +1.

willin commented 7 years ago

+1

ypapouin commented 7 years ago

Completely off-topic, but after being spam with +1 replies, I cannot blame users for this for multiple reasons :

Jonathan0wh commented 7 years ago

It was good to hear that mini-map function is under developing, which gives me who transferred from sublime text more confidence to stay with vs code.

dannystaple commented 7 years ago

Is there any reason this wouldn't be implemented as an extension? If that is available - it sounds like a perfect thing for an extension.

techsin commented 7 years ago

extension would be temporary solution not a good solution. Do you really want to install basic features individually via extensions?. First Download VScode, then here is the list of 30 extensions that may not work together at all but will be needed to provide most basic functionalities. (1. copy/paste v3.0, 2. tabs, 3. auto indent, 4. tabstospace, 5. autosave, 6. color highlighter,...... 28. birdeyeview_by_dx3ee_v1.0.1 ...)

nengxu commented 7 years ago

Waiting for the implementation of this minimap function to switch from Atom.

sapiraz commented 7 years ago

@techsin It's not really a basic feature.. it's more of a personal preference. As far as I've seen however, as of now the API does not allow rendering custom elements to such extent, therefore it's not so feasible to even attempt creating such an extension.

jfcartier commented 7 years ago

@sapiraz I agree with you, it isn't essential for a text editor, but I also think it's one of the reasons why Sublime Text (or Atom) is so popular. It's a 'key' feature that makes people hooked! As an example, lets say every editor has black text and white background, and a new text editor offer the choice to change that to your will. Of course it's not really crucial for the purpose of a text editor, but it enhance the experience so much that people are ready to leave their good editor to this one. And I think that's what's going on here. UX is essential as well ;)

JonnyBGod commented 7 years ago

UX is essencial, makes the diference between a good experience and a super annoying feeling that you get when you feel "this is not right" or "I really miss that".

This is not different than having good shortcuts and search. Are these essencial to code? Not really but then again I can code with text editor...

druellan commented 7 years ago

I need to agree to @sapiraz here, could be a nice feature or even an important one for many people, but lets not call it a basic one. So far Sublime is the only editor that has this as default (on Atom is an extension by abe33), and Sublime lacks the extended functionality on the scrollbar that Code provides.

For me speed and stability are by far better features and truly "basic" ones, and if the team is working on implement this the best way possible, I'll give them all the time they need.

sapiraz commented 7 years ago

@jfcartier, @JonnyBGod Well of course UX is important. I too like the minimap feature in other editors and hope to see it in VSCode soon.. but let's not call it what it isn't - a basic feature.

You can't really compare it with shortcuts, search, copy/paste or even color scheme support because these features are so essential and add such obvious value to the working environment (Yes, even color schemes are important - I suffer from eye strain and sitting 9 hours a day in front of a bright white screen doesn't do any good to my eyes) whereas the minimap simply doesn't provide such important usability that you cannot live without.

If anyone asks you what value the minimap adds, could you come up with a good argument other than "looks nice"? I couldn't. Again, I love the feature, after working with Sublime text & Atom I really liked having it in the side just to have a little perspective of where I am. but is it necessary? nope. You can scroll, you can see the contents of your file, you see some hints on the current scrollbar, why is seeing your code in a small unreadable version any useful to you?

I'm working with VSCode right now on on multiple projects, and chose it due to lack of real basic features other modern editors have.. among them are performance & stability (ehem, Brackets), multilingual support (Sublime), native support of web languages & Intellisense (sorry Atom) or even native, easy to use extension installer ( again, Sublime )

fredrikaverpil commented 7 years ago

anyone asks you what value the minimap adds, could you come up with a good argument other than "looks nice"?

Yes. It substantially helps navigate a large file. At least that's why I miss it so dearly.

sapiraz commented 7 years ago

@fredrikaverpil Well "substantially" in my opinion is a bit of an exaggeration, but sure. Still can't really compare it with search or copy/paste..

martin-sweeny commented 7 years ago

@fredrikaverpil There are other useful ways to navigate a large file. @sapiraz is right in that this is not a basic feature, and that comparing it to truly basic features (like auto-indent on paste.. come on!) is a bit of a stretch.

That said, I think we can all agree that we really want this to be available one way or another.

lankymart commented 7 years ago

This thread has taken an onymous turn, look it's a feature I miss in VSCode at the moment. If it could be implemented in a coming version great if not, it would be a shame but I'll try to cope.

jfcartier commented 7 years ago

@sapiraz I totally agree with your arguments and wouldn't refute them just to refute, because I think any down to earth person would say the same. But there is a but (and this is my last post here, enough spamming lol)

could you come up with a good argument other than "looks nice"? I couldn't. ... why is seeing your code in a small unreadable version any useful to you?

Lets not say it's not useful, because you don't see it that way. Normally, to tell if something is useful, statistics helps a lot, but I don't have any, so I can only rely on all those people (including myself) who won't use VS only because of this! It isn't nothing. Of course, I think we'd all agree that it's clearly a resistance to change, but we still say it's useful to us and it isn't very scientific to lower the importance of it by a personal judgment.

If i can provide an argument. Here is one : default (Precision) Since I know my code, I know that I've changed Db queries by the shape of it. (Speed) With one click, I can get there. No scroll. (UX) If you work in big files, it helps a lot. It gives the feeling to control everything, so you don't have to search.

san-chang commented 7 years ago

I'm so glad to see this feature in February Iteration Plan #20021

We will meet this feature at the beginning of March Thank you for your work @all

phrohdoh commented 7 years ago

Once shipped will users be able to disable this completely?

I don't care to have this moving any bit of performance from one place to another just to render another, smaller view.

I'll stick with /,? searching because I have everything I need with those.

heliopassarelli commented 7 years ago

+1 for the Minimap. Rly w8ing

sapiraz commented 7 years ago

Seems to already be available in the insiders version, Has to be enabled in the settings though, set "editor.minimap.enabled" to true :)

gamedevsam commented 7 years ago

I tried the minimap in the insiders version, and it's looking great guys!

A couple of suggestions:

PS: Performance is fantastic, kudos to you guys!

mika76 commented 7 years ago

Please make sure that highlights are really visible in the minimap (like running a find function) since in Sublime, even though they are highlighted, the highligh is so minimal that you pretty much have to go through the whole file anyway...

Thanks for listening 😄

stooboo commented 7 years ago

Being able to scroll up'n'down would be good... (like Sublime) At the moment it seems to be click on it only :-(

Great work tho' - much appreciated !

On 19 February 2017 at 21:20, Mladen Mihajlović notifications@github.com wrote:

Please make sure that highlights are really visible in the minimap (like running a find function) since in Sublime, even though they are highlighted, the highligh is so minimal that you pretty much have to go through the whole file anyway...

Thanks for listening 😄

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/vscode/issues/4865#issuecomment-280949966, or mute the thread https://github.com/notifications/unsubscribe-auth/AATV7DaFs9W2PNnpIYzmSIQQqaIDv60Sks5reLIJgaJpZM4H93xs .

ghost commented 7 years ago

Being able to scroll via clicking/dragging the overlay mask. Same as atom, sublime text, brackets, geany etc

chriswiley commented 7 years ago

Would it be possible to adjust the magnification level? Sometimes I'd like to make it bigger or smaller font sizes depending on what I am working on.

alexdima commented 7 years ago

Thank you for your patience on this feature request.

Basics

minimap-geometry


A note on the fonts

image


Trying it out

"editor.minimap.enabled": true on the insiders channel


What's done

The character/tokens rendering code is in a good enough shape (perf wise) to ship it: pixels from the previous frame are copied over to the next frame as they are needed, making a minimap render mostly take below 1ms. Under certain conditions (e.g. minified word-wrapped file, jumping to a different vertical position) it can take up to a few tens of ms, but overall, I'm somewhat happy with the char rendering code.

What's left to do

There are many things left to do. To name just a few:

Some are a matter of spending more time, while others are more challenging (e.g. should errors outside the minimap be painted somewhere, can we have the minimap take over the need for an overview ruler, etc.)

We'll track all minimap related issues with the label editor-minimap and I'd like to close this issue at this point.

Let's continue discussions in specific issues covering different aspects, some of them will make it in February, while we'll tackle some other later on.

skl131313 commented 7 years ago

@alexandrudima

What about this comment? https://github.com/Microsoft/vscode/issues/4865#issuecomment-255368352

I'd prefer it over small unreadable text and it provides the information I need. I'm not sure how difficult it would be but by the sounds of it you could just create a new font where every character is just a solid square, minus whitespace.

alexdima commented 7 years ago

@sprinkle131313 I've extracted your comment to a separate issue - #20947.

Let's continue discussions in specific separate issues, please feel free to create new issues if you don't find one existing. I will continue to update my comment above with links so we can all participate in the specific discussions.

Alexdelgadodiaz commented 7 years ago

Thank you! Willing to see it stable!

ghiscoding commented 7 years ago

Question: is it possible to have the minimap also be a cursor? This is the default behavior in VS, and this is what I see as the main differences between the 2 apps. Also note that I did install the insiders version to test it out

EDIT Nevermind, just realized there's an open issue #20935 for that

octref commented 7 years ago

@alexandrudima Thanks for #20947. Is it possible to have "editor.minimap.renderCharacters": false as the default to render block instead of text? IMO it looks much more pleasing and has better usability.

image

FANMixco commented 7 years ago

I'd like to be able to zoom when I'm over the text or block (it depends on the final approach). Currently, I cannot read anything or know in which part of the code I am, this is useful if you're working on a large piece of code. Also, I discovered that if I keep the click and try scrolling or moving over the minimap nothing happens, I need to stop to click and choose another section of the code.

druellan commented 7 years ago

@FANMixco I was thinking about your petition, but I'm currently unsure about why you need such a feature, since if you click on the minimap, the code is scrolled to that point without moving the cursor, so it is effectively the same thing as a hover/zoom. Perhaps hovering is more efficient than clicking?

ghiscoding commented 7 years ago

@druellan , I believe that @FANMixco is talking about a minimap zoom feature that is already in the regular Visual Studio as shown below minimap_zoom

EDIT Forgot to mention that the zoom shows up only after staying over the minimap for 2sec. If you go over the minimap and start scrolling, the zoom won't show up, you really need to stop scrolling and wait 2sec to see it.

pohmelie commented 7 years ago

If @ghiscoding is right about @FANMixco feature, then it definitely should be optional, since I think many people (as I do) don't like popups.

druellan commented 7 years ago

Thanks @ghiscoding, now is more clear. I still kind of believe this is not a huge improvement over the click+slide mechanism, in fact, looks more useful WITHOUT the minimap, on the enhanced scrollbar itself. Kind of a stand-alone feature and not part of the minimap feature.

About @pohmelie suggestion, I totally agree, but I believe this also can be attached to a shortkey modificator, like ctrl+hover on the scrollbar/minimap to trigger the function.

mika76 commented 7 years ago

@druellan This is also the same as the https://atom.io/packages/minimap-codeglance extension on Atom. 11,000 downloads seems to suggest lots of people like/need it.

Personally I do not, so if you do implement it, please make it optional. A trigger/hotkey mechanism does sound good though especially if it's implemented on the scrollbar as well as minimap.

Sartan4455 commented 7 years ago

Is there a way to toggle it like toggle-sidebar(ctrl-b) toggle-panel(ctrl-j) ?

sixenvi commented 7 years ago

I like the new minimap. One thing I'm missing is the highlighting of text found with search or find-duplicates. I attached two screenshots to visualize that matter.

image image

igoreliasm commented 7 years ago

Nice feature guys!

💃

ghiscoding commented 7 years ago

@sixenvi I suggest you to add to a separate feature request #21404 that I asked, since your request is very similar to mine and is an open issue, so at least it's tracked.

I'm not sure that the VSCode team read comments or requests on issues that are closed, like this one here.

FANMixco commented 7 years ago

Hi @druellan ! Yeah, what @ghiscoding is what I meant, maybe we could configure about the time because it's a bit confuse.

pouyakary commented 7 years ago

Hi everyone! If VS Code just missed one feature it was this and now it's compelete! Such a nice implementation and great performance. (@alexandrudima as always you fascinate me!)

Just one simple thing that I noticed:

out-of-screen-scroll

nojvek commented 7 years ago

Good find. I think you should file a new bug as this is closed. Vscode team may not see it.

On Fri, Mar 3, 2017 at 7:51 AM Pouya Kary notifications@github.com wrote:

Hi everyone! If VS Code just missed one feature it was this and no has nothing I could have wished to have! Such a nice implementation and great performance. (As always you fascinate me!)

Just one simple thing that I noticed:

[image: out-of-screen-scroll] https://cloud.githubusercontent.com/assets/2157285/23557582/c264e420-0045-11e7-9ea6-8789f30db9de.gif

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Microsoft/vscode/issues/4865#issuecomment-283990000, or mute the thread https://github.com/notifications/unsubscribe-auth/AA-JVANXdhu57m4hlAODRcV6qhsNGzgrks5riDb3gaJpZM4H93xs .

pouyakary commented 7 years ago

@nojvek ah didn't notice that! okay one more issue...

Andrfas commented 7 years ago

One more thing would be great I think - do not hide current position on minimap (currently it is visible only on mouseover). image Probably having one more key in settings for this would be best.

ghiscoding commented 7 years ago

@Andrfas this is tracked under #21404 and #21784.

As a suggestion, you guys should stop writing in a closed issue that is not tracked anymore and search/open new issue.

Steviey commented 7 years ago

I want scrollbar buttons.