Another new plugin! This one requested by a customer so they could collapse some XML (or HTML) on command.
Is there any way to have CodeRush collapse HTML or XML elements which have a ‘name’ or ‘id’ attribute?
The theory behind this is that those elements with an id or name attribute, are typically the ones that hold the high level structure. Collapsing these items will cause the structure of the HTML to be revealed.
In some ways it ‘s like CodeRush’s own Collapse to Projects functionality in solution explorer.
The user wishes to get a high level view of their HTML so that they can decide which area to drill back down into.
Now CodeRush doesn’t naturally support this functionality for HTML/XML out of the box, but you guys know me by now
Yeah I wrote a plugin
CollapseXML for CodeRush
CollapseXML works (despite it’s name) on both HTML and XML. It adds a new command (CollapseXML) which you can bind to any key you like.
Once installed and configured, simply place your caret within an XML or HTML file, and invoke the command using your configured key.
CodeRush will happily collapse your XML/HTML from…
… to…
Availability
This plugin is available from either The Visual Studio Gallery of from GitHub
The source is available on Github