'VS10x CodeMap' - Overview
VS10x CodeMap is a Visual Studio extension that displays a graphical nested representation of the current editor window code (C# and VB.NET). It helps the developer visualize type nesting, implemented interfaces, regions, member type and scope, as well as quickly navigate to their respective position in the code editor.
'VS10x CodeMap' - Details
1. Code Visualization
Have a look at the small sample below. Notice the way nested types are represented, as well as the implemented interface. The region sub-container is prefixed with a # for an easier identification. Members have distinctive icons, with special overlays for constructors, public items (not pictured in the below example) and members belonging to implemented interfaces.
2. Code Collapsing and Sync
Most containers can be collapsed (exception: interface containers) in order to help you stay focused on items that are currently in development. What's worth to notice is that a collapse operation in CodeMap will also collapse the corresponding part in the code editor. Moreover, it works both ways, so if you for example collapse a class in the code editor, the corresponding container in CodeMap will get collapsed as well!
3. Persistent History
CodeMap is also a navigational tool - if you double-click an item, its position in code will be brought into view. That is something you should expect, of course, but CodeMap also makes returning to the last viewed/edited members a breeze by highlighting the last 5 edited (C# only) or accessed items by using various techniques:
- In CodeMap, with a blueish distinctive icon to the right of the item's graphical representation, the icon opacity reflecting the item's recentness in the local history.
- In the editor, with a bluish background color for the entire member body.
- On the Scroll Map (a special area added by CodeMap to the left of the vertical scrollbar), blue rectangles are added to represent the member position relative to the entire code file (you can align the scroll thumb with the blue marker to bring the item into view).
Please note that the above behavior is fully customizable, there's a CodeMap Options dialog where this can be done.
4. Highlighting Items with Color Labels
Now, highlighting recently accessed items may be good, but what if you have items you return to over and over? Well, you can specify a special highlight by applying a color label (yellow, red, green, blue, purple, gray). As with history, labeled items are emphasized in various ways:
- In CodeMap, with a colored background applied to the item's name.
- In the editor, with a reddish background color for the entire member body.
- On the Scroll Map (a special area added by CodeMap to the left of the vertical scrollbar), red rectangles are added to represent the member position relative to the entire code file (you can align the scroll thumb with the blue marker to bring the item into view).
The behavior for the above last two emphasizing techniques is customizable.
5. Named Bookmarks
In large code files, a code elements-based code map might not be enough. If you find yourself looking over an over for certain positions in code, then named bookmarks are for you. Simply start a comment with the BMK token and then type in a meaninful name (this will end up with something like //BMK Some name here in C# or 'BMK Some name here in VB) and VS10x CodeMap will pick that up and add the name at the top of the containing element, so that you can find it instantly.
This is a bit experimental from a UX perspective, as we are planning for it to be part of a much bigger picture. However, since it is fully implemented from a functional perspective, then maybe somebody needs it, so we decided to publish it.
In order to use filtering, just hover your mouse over the narrow orange bar at the top of CodeMap. A textbox will appear where you can enter the filter text.
In order to cancel an existing filter, either right-click the filter textbox, or press Esc while in the filter textbox.
Since v1.38, the filter textbox can be configured to be visible all the time (that is, its auto-hide behavior can be disabled).
7. Color themes
The base color used for CodeMap can be specified by the user (blue, red, green or grayscale), with results as illustrated below:
You can even use an 'alternating colors' theme. When selecting this one, neighboring/nested containers are given different colors (if possible) for additional visual distinction:
Also, for developers using a Microsoft Expression Blend - like dark theme, CodeMap also has the option to use a dark background color and a 'Dark' theme, with the following result:
'VS10x CodeMap' - Options
CodeMap's appearance and behavior can be customized by using the VS10x CodeMap - Customize dialog box, which is accessible from the right-click popup menu over CodeMap:
'VS10x Comments Extender' - Overview
VS10x Comments Extender is a Visual Studio extension built with the goal of making code commenting more useful from both a documenting and a productivity standpoint. By using a simple comment prefix system, you can change the default formatting of a comment by affecting its foreground color, font size and style. It works with C#, VB, C++ and F# documents.
'VS10x Comments Extender' - Details
Let's start with a brief example of what VS10x Comments Extender can help you achieve:
How does it work? Well, when you start a comment with // (C#, C++, F#) or ' (VB), you can add some extra characters (minimum one, maximum three) in order to define how this comment will look like. VS10x Comments Extender will interpret these prefixes and format the comment accordingly. Here are the possible combinations:
|In C#/C++/F#||In VB||Meaning||Formatting|
|//+||'+||Large size||Normal text color, large size|
|//++||'++||Extra large zie||Normal text color, extra large size|
|//-||'-||Small size||Normal text color, small size|
|//--||'--||Extra small size||Normal text color, extra small size|
|//!||'!||Important comment||Red text color|
|//!+||'!+||Important comment, large||Red text color, large size|
|//!++||'!++||Important comment, extra large||Red text color, extra large size|
|//?||'?||Question||Magenta text color|
|//?+||'?+||Question, large||Magenta text color, large size|
|//?++||'?++||Question, extra large||Magenta text color, extra large size|
|//x||'x||Removed code||Light gray color, strikethrough|
Let's have a look at two comment styles (i.e. "removed code" and "important") - notice the strikethrough font style and grayed-out color used to visually isolate removed code, and the red color used to emphasize an important comment:
Additionally, a "question" style is available (actually, you can use any different meaning according to your needs) that stands out by using a magenta foreground color:
And this obviously is not all of it. You can affect the size - currently, two large sizes (large and extra large) are implemented; see the below "Column" comment text in extra large size:
'VS10x Comments Extender' - Options
VS10x Comments Extender can be customized in terms of colors, font size and enabled/disabled state for each comment style.
Color customization can be performed in the Visual Studio "Fonts and Colors" options page (look for items starting with "Comment, "):
Font size for large and extra large styles, as well as enabled/disabled state can be set by opening the "VS10x Comments Extender - Options" dialog box from the VS10x menu entry on the main menubar.
'VS10x Editor View Enhancer' - Overview
VS10x Editor View Enhancer is a Visual Studio extension whose goal is to add new visual features to the built-in code editor. It currently supports type and member definitions emphasizing, end-of-block details, clickable hotspots (C# and VB documents).
'VS10x Editor View Enhancer' - Details
Here's how the code editor normally looks like - yes, I know you know, but it's easier this way to see what goes in:
And now, here's how it looks like with the VS10x Editor View Enhancer extension:
Pretty simple, but equally effective.
Type names are by default displayed with red foreground color and in bold, while method/property names are by default displayed with red foreground color. Type and member definitions lines get a semi-transparent distinctive image added to the left side. It's not shown here, but single-line property definitions don't get the red foreground, as that would have been a visual overkill probably since these single-line property definitions usually come in packs :-)
And all these can be customized - if you want, you can even get extreme (for details on customization please go to next paragraph):
'VS10x Editor View Enhancer' - Options
You can customize the way definitions lines are emphasized. You can control color, bold, italic, font size, font face and whether the distinctive image should be displayed or not.
The Options dialog box can be accessed from the VS10x menu popup which can be found on the main menu.