On this morning's little public editor conference call, someone remarked (and others agreed) that they wanted a way to do "collapse everything in this file but where the cursor is". Seems like an interesting enough scenario, and it's rather simple to write as an extension, so I went ahead and wrote one during the conference call:
CollapseAllButThis.cs on gist.github.com
One of the things it doesn't really do is handle commands (partially due to a desire for brevity, and partially because the MEF extensibility isn't there for that). It uses a keyprocessor to handle Ctrl+1 as the command for "collapse all but this", which has a few issues inside VS, which is why you should avoid using key processors inside visual studio:
I have a work item to make a MEF extension for handling existing commands in the editor, but it doesn't include the ability to register new commands. That's something you can do through DTE, but only if there is an add-in loaded. I'm mulling over creating a prototype extension for letting you create commands via MEF, but it's unfortunately not straightforward. Technically, it's also not really an editor thing, but it still seems like a useful thing to be able to do through MEF.
If you want to try this extension out, you can do what I do:
...and you should be off and running. Let me know if that doesn't work for you in the comments, and please feel free to take it and change it however you like. At some point in the future, I'll write an article about how outlining works in the new editor, which should shine more light on the types of things you can do like this (in 100 lines of code or less - this one clocks in around 50, I think).
Comments and questions welcome!