stefanceriu / SCXcodeMiniMap

Sublime Text like Minimap for Xcode
GNU General Public License v3.0
1.03k stars 87 forks source link

Add option to disable scrolling of the minimap #40

Closed mike-lischke closed 9 years ago

mike-lischke commented 9 years ago

Hi, can you please add the option to avoid scrolling the minimap? Instead show the entire file fully in the minimap. This scrolling is not only distracting but gives completely wrong feedback when clicking in the minimap to go to specific locations. Because of the scrolling the area of interest goes out of view or at least moves up or down - but always away form the cursor. I recommend to have a look at the same feature in Visual Studio. There's it's really well done.

stefanceriu commented 9 years ago

I'm not entirely sure that's a good idea, showing even more text in the mini map will force Xcode to syntax highlight more text, which in turn will make is slower. It will also make the text in the mini map very small as you would need to cram more of it in there. You can play around with the size slider to whatever suits your needs but it will definitely not look good on large source files.

mike-lischke commented 9 years ago

The keypoint here is probably to show only part of the source file, depending on the overall length. For instance show only every second or third line or merge the colors of 2-3 lines into one and just draw a line in the minimap. You don't print real text there anyway, right? I really recommend to have a look at Visual Studio 2013. There's a very good implementation of this feature. I have a 600K lines file (generated) which display totally smooth there with all lines seen in the map. It takes like 2-3 seconds to build it but then it's very smooth in use. It's so useful to jump to a certain area in the file via the map, which is otherwise a lot of guessing and scrolling around.

Here's a screen shot: bildschirmfoto 2015-02-28 um 15 04 38

stefanceriu commented 9 years ago

I see what you mean now although I'm not really sure how I can pull that off. I do actually display real text in there, the mini map and the main editor are hooked into the same text storage. The only things that are different between them are the colors, and only because those are drawn as temporary attributes, not affecting the storage. If I go and merge lines together I risk loosing the built in syntax highlighting, which I really don't want to do :)

I understand that VS has a nice implementation, the whole thing is pretty damn cool, but they have an advantage I don't.. access to real code without stumbling around in the dark and dumped private headers.

I will definitely keep your suggestion in mind, but realistically, it probably won't become a thing any time soon.

mike-lischke commented 9 years ago

I fully understand the limitations you are facing and I'm sure you will do your best. But with that scrolling I cannot use minimap atm. But maybe there are more supporters for my wish which will make a difference in the future :-) So keep this as feature request for a later date. Thanks anyway.

stefanceriu commented 9 years ago

Will do, thank you too for the interesting talk :+1: