Scott Hanselman

Introducing RockScroll

May 10, 2008 Comment on this post [64] Posted in Musings | Tools
Sponsored By

When I came to Microsoft I saw a really cool tool being used internally and immediately wanted to work with the author, Rocky Downs (who is blogless, but exceeding talented), to get it released. Fast forward to now, plus an installer, and here it is.

The basic (as in "only") idea is that RockScroll extends the scrollbar in Visual Studio to show a syntax highlighted thumbnail view of your source. This is really useful for those excessively long source code files you know you have. It's just one DLL and you can turn it off from Tools|AddIns just by un-checking the checkbox.

Enjoy!

RockScroll

works-on-my-machine-starburst Works On My Machine Disclaimer: This is released with exactly zero warranty or support. If it deletes files or kills your family pet, you have been warned. It might work great, and it might not. It hasn't been tested against the myriad of other VS Add-Ins, but it works on my machine in both VS2005 and VS2008. It does look a little odd next to Resharper, a tool that also adds a scrollbar. Good luck.

A reader, Hans, says: "I have found that (not suprisingly) RockScroll works very well with split windows, if you bind a shortcut key to the "Window.Split" command." for those of you having trouble with split windows.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
May 10, 2008 1:34
Wow.... that's great...
It can be of great help on the project where I'm now, with 350Kb and 10k lines code files :)
I can also act as stress test for the tool :)
Will test it next Monday...
May 10, 2008 1:41
"Works on my machine" as well, however it doesn't play nicely with collapsed code sections. It doesn't break or anything, it just doesn't reflect your position accurately. It also doesn't work with aspx files.

Still, definetly worth trying out for a bit of time.
Tom
May 10, 2008 1:48
It does more than advertised: doubleclick a word and it will highlight in purple everywhere that word is used, and block-red everywhere in the scrollbar. It's a simple find/highlight - not matching whole words or anything, but a nice unadvertised feature. (You can double click a semi-colon actually)
Tom
May 10, 2008 1:51
I saw the same thing as Tom, which is rather unfortunate since I use regions quite a bit to isolate the code I care about from the everything else. I don't suppose this nice little add-in will be released to the community so these minor issues can be fixed?
May 10, 2008 1:56
WOW, what a fantastic idea! The only thing I noticed is that it does not apply for ASPX files. Just the cs files.. Maybe in future releases it'll also include web forms.

Thanks for showing this off.. It's awesome!
May 10, 2008 1:56
There's a downside that I don't see mentioned here.

Some folk may take this as making it easier to keep writing unwieldy, unmaintainable, spagetti code. I'm sure that's not Rocky's intent, but it may be an unintended side-effect. Shouldn't it be painful to write bad code?
May 10, 2008 2:02
At first I thought - would i use that? Then I suddenly thought it maybe really useful for javascript files where the old goto definition doesn't work.... unfortunatly the tool only seems to work with .net code files.

Support for all file types would be great. Anyway I'll give it go, thanks for the link.
May 10, 2008 2:08
Very cool, indeed. Also works on my machine.

@kevwil-It's easy enough to write crap code as is. I don't see this making it easier.

My only (admittedly trivial) gripe is that you can't set the highlighter colors for it different from what's used in the actual code window (I code in mainly White on Black text, which comes out a little monochrome in the scroll bar).

Another unadvertised feature. It draws a little red box for every breakpoint that's set.

I'd love to see the source for this bad boy<hint - hint> Maybe you could lean on Rocky?
May 10, 2008 2:24
I would like to see support for other files typs like js, css, and aspx. Very cool tool. Thanks for the post.
May 10, 2008 2:29
Nice utility for dealing with ugly large files. As others pointed out, not working nice with collapsed code is sort of a bummer but hey it's free.
May 10, 2008 2:36
After installing it, my cat died! ;-)
May 10, 2008 2:45
The tool is great, the only issue is that it disregards regions. It only works good if it all outlining is set to 'toggle all'
May 10, 2008 3:00
I confirm that it works on Microsoft Visual Studio 2008 RTM. It's a great tool! Love it..
May 10, 2008 3:05
Great tool Scott. Thanks for sharing!

Thanks also to Rocky Downs for writing it.

-- Stu
Stu
May 10, 2008 3:23
Its an awesome addin but he lack of region support is a deal breaker for me. Still, it's a great concept! I hope that Rocky will continue working on it or release it on Codeplex so we can work to improve it.
May 10, 2008 6:54
Works for me. I don't have R# installed on this machine, and I'm wondering if the two play well together since R# uses the VS.NET scrollbars. Anyone tried it?
May 10, 2008 7:26
the cat dying comment made my day.
looks like a fun tool
May 10, 2008 7:31
This is fantastic - a similar idea exists in KDIFF3 and I love it!
May 10, 2008 7:56
Works on my machine running VS 2005. But, it doesn't show syntax coloring if you have customized look and feel of your VS.

Another issue is that, if you want to turn it off using Tools|AddIns..., it doesn't remove untill you close the code file. In general, it may be a good utility for those, who does not organize their code in regions.
May 10, 2008 8:01
Scott,
Pointing the link on image to the installer download is very confusing. I clicked on the image thinking that it will show the enlarged image and It displayed download dialog. This looks like cheap marketing stretegy. And you are not marketing RockScroll, are you :).
May 10, 2008 8:31
I want to thank Scott for showcasing my tool. I am glad many are finding it interesting.

I use this add-in as my Visual Studio scrollbar. I find it useful for large and small files. The double click – instant find in file is my favorite feature. I end up double clicking on identifiers often when I am debugging or refactoring code. Many times I use the double click to do a find in file rather than using find all references or go-to definition. You can clear a find in file by right clicking in the scrollbar.

Breakpoints and bookmarks are visualized in the right side of the scrollbar. Recent edits are visualized on the left size (orange for unsaved changes and blue for saved changes).

In the scrollbar C++ and C# single line comments are colored green. Other comment syntax is not recognized now.

To address some concerns mentioned above:

XML type files are not supported. There are several file extensions that fall into this type. The reason for this is to keep Rockscroll out of the resource editor. If you really want to use a certain file type with Rockscroll you can either change the extension or dissociate that extension with that document type in VS. (I am at home right now and do not have the latest tools at home, but it is something like:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.0\Editors\{C76D83F8-A489-11D0-8195-00A0C91BBEE3}\Extensions )

I would like to support outlining at some point. As others have noted, the scrollbar gets out of sync when there are collapsed nodes. Personal preferences vary, but I find the scrollbar with its single click navigation and visualizations to give me a workflow that competes with outlining.

All colors are currently hardcoded. I would like to hook it up to the VS fonts and colors at some point. The width is hardcoded as well. I always wanted to make the width dynamic so you could drag it out wider if needed.

I will look into a codeplex project in the future. The major current item holding me back is that this tool is really hard to build. This tool does not use any private interfaces or APIs, but some of COM interfaces I use are being pulled in through internal source files. So, I would need to divorce myself from those files first. Also, it would possibly require VSIP to build.

Thanks,
Rocky
May 10, 2008 8:46
Cool idea, but doesn't support collapsed code sections; not usable for me in its current form.
May 10, 2008 9:35
Yanesh - It wasn't intended to be a marketing strategy, considering that it's FREE. ;) I was just trying to make it easy to download as I'm always hunting for the download button when I see free tools. I'll change it if it bothers you.
May 10, 2008 9:37
I'm totally surprised at all the folks who used code regions. I just don't. I'm amazing. I tend to use more, smaller files, rather than something really long with lots of regions. I think that if you have that many regions it might be time to refactor? ;)
May 10, 2008 11:14
Rocky and Scott -- this is awesome! Thanks for sharing it!
May 10, 2008 11:16
And for the record, I am also in the "regions suck" camp. #region is like GOTOs -- useful in controlled circumstances if you know what you're doing, but generally abused.
May 10, 2008 13:33
About the add-in: This is one of the coolest and most useful add-ins I've seen. Tell Rocky that he ROCKS!

About the code region part: In a perfect world - where you work with good specifications and people that know what they are doing - code regions should not exist. Alas, in the real world were you work on projects with tight deadlines and many people that are geographically separated, code regions may be the last resort to make ugly, bad code readable. Sad but true.
May 10, 2008 15:43
Is it possible to increase width of scrollbar? perhaps in registry?
May 10, 2008 16:57
Thanks for sharing this. Love it. But what I really don't like about this tool is that it takes away my default scroll bar. I want the default scroll bar to stay and this thing to work "with" the default scroll bar rather than replacing the default scroll bar. Rocky should use "Rored" a RoR editor to get inspired. Rored does the exact same thing very elegantly by leaving the default scroll bar intact. And yes, it doesn't show syntax coloring if you have customized look and feel of your visual studio.

Again, thanks for sharing this. Love it!
May 10, 2008 16:59
Thanks for sharing this. Love it. However, What I really don't like about this tool is that it takes away my default scroll bar. I want the default scroll bar to stay and this thing to work "with" the default scroll bar rather than replacing the default scroll bar. Rocky should use "Rored" a RoR editor to get inspired. Rored does the exact same thing very elegantly by leaving the default scroll bar intact. And yes, it doesn't show syntax coloring if you have customized look and feel of your visual studio.

Again, thanks for sharing this. Love it!
May 11, 2008 0:40
I have installed it and I have came back here and double clicked "css" to see if others are using it for browsing css. But nothing appeared on right side of screen! Such an addictive tool!

Very thanks for sharing!
May 11, 2008 2:09
Regions Suck? I was wondering if anybody else but me thought that.

Nice to know I've got some company out there.

What is it with this technique of putting every dang method/property in a region anyway?

Maybe I've just become "an old coot"<g>
May 11, 2008 11:22
Awww sweet!

Would really love to see the source code for this one.

Thanks guys.
May 11, 2008 11:56
Scott, I decorate each an every class with regions ("fields", "properties", etc), so the length of the code file has nothing to do with regions use.
Kevin, I don't like someone forcing me to do the "right thing", as I would rather have the choice myself.
May 11, 2008 12:25
Scott, I decorate each and every class with regions ("fields", "properties", etc), so the length of the code file has nothing to do with regions use.
Kevin, I don't like someone forcing me to do the "right thing", as I would rather have the choice myself.
May 11, 2008 21:03
<troll>People who prefer the verbosity of regions should switch to VB.</troll>

Nice tool. There are a few repainting issues at times, especially with Resharper installed. Otherwise it's great!
AC
May 11, 2008 23:29
Awesome tool, great find, but add me to the list of kids wishing for region support. I use Regions to "hide" the verbosity of necessarily verbose things, like WPF DependencyProperty definitions (and their myraid of callbacks).
May 12, 2008 5:07
Hey Rocky, nice work! Unfortunately it appears that it doesn't play nicely with Visual Assist, meaning that I've unfortunately had to uninstall it. No idea if you plan on supporting the tool further, but VA interoperability would be great.

Mark.
May 12, 2008 5:09
Wicked tool. Seems a little odd at first to be missing one of the "core" features, the vertical scroll bar. But I'm used to it by now.

It'd be nice if it supported VB comments. I'm one of those evil VB developers :) Even without the comments though, it's mad useful for finding "arrow code". And getting some kind of extra spatial sense of where I am in a code file is fab. Good job Rocky
May 12, 2008 13:56
Hi Rocky and Scott,

this is really a great tool! It's one of those simple but extremely good ideas, my congratulations!
I would suggest, you divorce yourself from the COM-components if you have the time. Bringing the project to codeplex would make many people happy (me included). There are definitely points that have to be in control of the user to make it THE tool, but hey, that's what the tool will converge to at codeplex.

I will definitely recommend it to my colleagues and friends!

@Scott: Please let us know, which way the tool will go!

Regards,
Dennis
May 12, 2008 15:24
Before I can use this at work...
...Regions need to be supported (I like them when used consistently)
...I would also like my default Scrollbar to remain (perhaps make this an option)
...I would like vb syntax highlighting

Otherwise, quite nice. More and more people seem to be making use of the scrollbar area.
For example Coderush's Beta feature - Code Analysis (Code Issues)

Good stuff. I will be interested in any follow up information of the development of this addin.
May 12, 2008 18:32
1. FeelingTheLove++
2. RegionsSuck++
3. Works ok with R#, but the display is a little funky. Passable though.

Suggestion: put it in a pane, so that its undockable, hide able, pin able, etc.
May 12, 2008 19:29
Wonderful addin, thank you very much.
May 12, 2008 23:19
Hi,

I like the idea.

But I had to uninstall it because it doesn't work with split screens. The option is removed.

Eric
May 13, 2008 19:25
Doesn't play well with Coderush since it uses the scroll bars, the SB area kinda covers the greeking proxy, you have to split the code window to get the full proxy view.

A question for Rocky, how are you getting the greeked text representation? Just a bitmap of the editor region and scaling it down or somthing cooler?

Thanks for the tool!
May 13, 2008 20:57
A little off topic, but, Sott, you're not using CodeRush anymore? Is there any particular advantage you've found on Resharper over CodeRush?


May 13, 2008 21:56
Sounds awesome - too bad it doesn't work with .js files. (Not sure why those would be considered an 'XML' file?)
May 14, 2008 21:30
Works on my machine too. However if you have word wrap on (someone previous to me wrote long lines of code) the sync is a little off. This was tested by turning word wrap off and then the scroll is in sync with the editor.
May 15, 2008 2:18
Excellent tool! Thanks, Rocky.

I sometimes use regions, depends on the project. I often use the internal "non region" method collapser. The navigation of large files in VS leaves a lot to be desired and this tool goes a long way towards fixing it.
May 15, 2008 6:19
The little spliiter rectangle that normally lives directly above the scroll bar is gone :( Would be nice to be able to split view the current document with RockScroll installed.
May 16, 2008 10:31
"(who is blogless, but exceeding talented)"

What do you mean by this?
The exceeding people always have blogs?
blogs makes you a better professional?

Don't take me in the wrong way, I love to read your blog.
Just that comment was strange ;)

Joo
May 16, 2008 11:22
Joo - Not really. Everytime I mention a person and DON'T link to their blog, someone says something. "Where's their blog?" "What? No Link?" So this time I was trying to explain the lack of link. ;)
May 16, 2008 12:33
Cool Tool! Simple idea brings great convenience for programmer.
Though it is a little confusing when there are collapsed region in editor area. Hope this can be fixed soon.
May 19, 2008 5:51
It didn't kill my cat, but it did seem to cause a long freeze after every build (successful or unsuccessful) when working on a large solution with embarrassingly long source files.
May 19, 2008 23:43
Like it a lot. I definitely need JS support, since those are the most unweidly of files in my current project.
May 20, 2008 7:01
I must be missing something obvious: how do you scroll by a single line (a'la clicking the arrow buttons of the regular scroller)?
May 22, 2008 19:21
This is a very cool idea, and a good start, but the lack of support for collapsible regions is a deal breaker. If it worked accurately with collapsed regions, I would definitely leave this add-in turned on.
Max
May 23, 2008 7:30
Awesome! Thanks for sharing and for convincing Rocky to release this. Nice work Rocky!

I too am baffled by the region usage - I worked w/ someone that used them a LOT and it was quite disturbing since he insisted on collapsing the region we were looking at before moving on to look at other code.

Add another plea for a codeplex release.

John
May 25, 2008 16:45
The more I use it, the more I like it!!

I'm getting the occasional crash with RockScroll. I have submitted the crash report through the automated tool.

It seems that when closing a file, RockScroll can become confused.

Even if you don't open the source, Rocky, you might wish to find a home for it so you can organize feedback and releases.

Thanks, again,
John
May 29, 2008 19:23
Ok, I've used it for a week and LOVE rockscroll.

Can we PLEASE have a regkey to set an RGB color for the double-click highlight color? Pretty please!!? Did I mention I love it?

John
June 09, 2008 23:47
Hi , this tool is awesome!!! Works on my machine perfectly.
June 18, 2008 11:52
I gotta say i really like the idea, sadly i think it still has too many kinks to really be usefull. It would be nice if some extra development time could be thrown at it to make it more stable.

The region issue is also a problem for me. I agree that regions should not be misused, but sometimes they are just nice so i can avoid seeing the same boilerplace code and having to scroll through it all the time.

Besides the region issue some files just make the scrollbar go crazy, so it shows icons for pinning windows, or other random content from my screen. When this happens i cant scroll at all and end up having to use pageup to navigate :(
June 26, 2008 16:07
Region support would be great...and really it isn't even region support. Any methods in a code-behind can be collapsed, and occasionally I choose to do this. If this toolbar supported that, it would be even more awesome! Either way, it's a creative solution that probably wasn't meant for public consumption. I really appreciate the effort that has already been put into this project. Thanks!
July 08, 2008 7:46
Still can't get enough of Rockscroll!!

Wish EVERYTHING had rockscroll!!

Word documents. Web pages. Emails. Disk drives. Movies. Books.

Rockscroll!!! ROOOOCCCCCCKKKKKKK SCROLLLLLLLLLLLLLL!!!!

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.