Opinion? What's that?

Having just recently transitioned to Visual Studio 2010 (finally) at my day job, I found myself in a bit of a predicament.

Previously we'd been using VS2005, for which there was a little extension called MetalScroll (based on another named RockScroll); this extension changed the scrollbar into an actual thumbnail of the code in the editor. For very large and complex files, this makes navigation considerably easier and quicker because you can learn the code's physical layout and identify important locations in the code by sight.

Unfortunately, as of VS2010 all extensions have to use WPF; MetalScroll was a Win32 extension and the author had no interest in rewriting it for the new version.

There are some other scrollbar replacements available for VS2010 (AllMargins by David Pugh, and the modified version of it which is included in Microsoft's Productivity Power Tools for VS2010).

 

StructureMargin

 

These have some nice new features, like showing a code preview tip window when you hover your cursor over the scrollbar, but none of them quite stack up to MetalScroll as far as navigation goes. AllMargins's included StructureMargin extension just shows an abstracted representation of code blocks and regions, while PPT's "full map" mode only renders every Nth line in large files, so the scrollbar image is not at all representative of the actual code layout.

Fortunately, while the source is not available for the improved version of StructureMargin that is included in PPT, the original one from AllMargins is. So this weekend, I decided to try my hand at tearing it down and rebuilding it into something approximating MetalScroll as closely as possible. Here's the result:

 

MetalMargin

 

I call it MetalMargin (very creative eh?). It retains some of the features from AllMargins that I liked (the code preview on mouseover), while removing and rewriting the abstract structure view into a direct physical preview, which uses your own VS color settings to draw the thumbnail.

It's available here if you're interested in giving it a try. I haven't tested it anywhere other than my home machine yet, so if you have a "clean" VS2010 environment which has not had 2005/2008 installed also, you may be missing some dependencies. YMMV

 


Comments
on Oct 19, 2011

Excellent, love your work so far! The closer to MetalScroll the better.

 

Bugs/requests:

- when installing MetalMargin, if CaretMargin, OverviewMargin etc. are already installed then the installer just says "Installation failed"

- I miss the MetalScroll feature to only highlight a word when double clicking it instead of single clicking

- it would be awesome to be able to change the color of the highlighted word in the text, right now it's very similar to my blue background color

 

Thanks, and keep it up! I will recommend this extension to all my coding colleges.

on Oct 19, 2011

HubertCumberdale
when installing MetalMargin, if CaretMargin, OverviewMargin etc. are already installed then the installer just says "Installation failed"

I believe that's a limitation of the VSIX installer (it won't install over existing copies of the same version).

 

- it would be awesome to be able to change the color of the highlighted word in the text, right now it's very similar to my blue background color

This can be done in the registry (the AdornmentMatchColor setting, IIRC), just edit the included file and re-merge it. AllMargins didn't have a VS options screen of its own, but that's on the to-do list.

on Oct 21, 2011

Genius!

I love this, please keep working on that. Most important thing to add IMO is an option to make doubleclick highlight a word, not singleclick as now (as the previous poster indicated).

If this takes off, you will have thousands of people downloading it and thanking you for that. So far IMO there has been no viable replacement of Metalscroll for VS2010. Productivity extensions were the best try, but they fall waaaay short.

Other things I'd love added (apart from doubleclick highlighting - this by way most important for me):

- Ability to change highlight color without tweaking the registry

- Better rendering of text in scrollbar (not just meaningless fat lines but the real thing downscaled)

- Display of highlighted item inline in text in scrollbar

 

on Oct 30, 2011

New version now available here. Refactored everything into just one vsix so it doesn't have install conflicts with AllMargins, and added in the options screen for all of the colors that are not pulled from the VS text color options already, as well as some configurations for the thumb (toggle the different colors on or off and configure which keywords get colored). An option for double click caret highlight is there but remains NYI for the time being.

on Nov 05, 2011

Nice, keep up the good work!

on Dec 14, 2011

My top request (apart from the NYI double click feature): show breakpoints and bookmarks in the margin.

Cheers.

on Feb 08, 2012

Just wondering, how do you remove this from VS? There doesn't seeem to be an easy way of doing so.

Great work BTW.

on Feb 08, 2012

It can be uninstalled from the Extension Manager in VS2010, same as any other extension.

on Feb 08, 2012

 My question is ... what exactly is it used for? I'm totally ignorant when it comes to this sort of thing.

on Feb 13, 2012

Just read the presentation at the top..? For large source code files it's really really useful to get an overview of the code and to see where in the code a certain variable is used without having to search.

 

Can't wait for the next version, keep it up kryo!

 

on Dec 20, 2012

Hi,

could you provide some link to the source of this extension? Or at least provide some information how can be turned off/change the color of highlighted line?

 

Best regards.

on Dec 20, 2012

Everything that doesn't just inherit from the VS text color settings should be in the MM options.

on Dec 20, 2012

Thanks for quick response.

on Mar 15, 2013

Sorry to bother you again, but I've started using Visual Studio 2012 in my day job, and I couldn't find appropriate replacement for MetalMargin. Do you have plans to release version for vs2012, and when would it be?

 

Best regards.

on Mar 15, 2013

zytane

Sorry to bother you again, but I've started using Visual Studio 2012 in my day job, and I couldn't find appropriate replacement for MetalMargin. Do you have plans to release version for vs2012, and when would it be?
Best regards.

 

+1

Can I add my support for this request too?