The best navigational tool for Visual Studio just got better. Relying on a Roslyn-based custom-built file code model, this new version of CodeMAP is perfectly accurate, immensely faster, with an impeccable notification system and almost imperceptible UI thread overhead.
If you're not already, you will get addicted to CodeMAP's elegant and efficient presentation. Everything is there: sorting, grouping, nested code representation, code collapsing with editor sync, navigation history, member highlighting with editor sync, drag'n drop reordering, built-in and custom views etc.
Testimony to CodeMAP's flexibility and power are its amount of options. You can customize almost anything you can think of in order to make it yours.
Code Flow Lines
Internal code structure made easier to understand - that's what code flow lines is all about. Fully customizable in terms of colors and opacities, soon customizable in terms of line style. Blocks of code can be collapsed by click and if you need to emphasize a code flow line for an instant then Alt+Click will temporarily increase the pen width.
This is an example of a C# 'switch' statement with a collapsed block. And of course these are persistent, i.e. after restart or when closing and reopening a code document, previously collapsed blocks will be picked up by the engine.
A great deal of effort has been put into making this feature highly customizable - single click, double click, which items to show, what colors and line styles, opacity control i.e. lines more visible or more discrete, whether the line at cursor position should be enhanced or not, mouse hover behavior, etc. If we have missed an option just let us know :-)
Simple enough: persistent code highlighting! Available from the formatting toolbar through several state buttons, i.e. click once to highlight (and it stays pressed), click again to remove highlight. Optionally, a popup menu with highlight colors can be displayed when you hover the mouse cursor over a text selection. Keyboard accelerators are also available.
Rich Code Format
The formatting toolbar comes with two more goodies: bold and italic, and they can be applied to any code selection! And, exactly as with code highlighting, rich code formatting (as this feature is called) is persistent - that is, format, close document or Visual Studio, open and the formatting will be restored. Clearing formatting is done in the same fashion as for highlighting, i.e. place cursor inside or select part of a formatted code area and de-press the corresponding (bold or italic) toolbar button. Currently, only bold is wired to a keyboard accelerator - and of course, that is Ctrl+B :-)
This will be familiar to those of you coming from CodeSMART 10 or VS10x Editor View Enhancer, but with a lot of twists: different formatting for types, constructors, regular methods and properties, even different formatting for regular private vs regular public methods. Not to mention region names are now part of the family :-) Once you use this you will never want to go back to the standard Visual Studio code highlighting!
Similar to everything else in Supercharger, you can tweak this subsystem to your personal preference. You don't like the colors? A name kind is not enhanced enough, or maybe it stands out too much for your taste? Just hit the Options and make it perfect!
Member kind images can be displayed to the left of the definition line, thus making for an even easier visual identification:
Attributes are definitely a very powerful thing - however, when they run in packs you begin wondering where the real type definition line (for example) is. Dimming attributes in terms of color and/or font size (customizable of course) can truly be a godsend in such cases.
If you have ever wondered what that closing bracket is from, then this feature is for you. Of course, it also works in VB, and because it uses the same Roslyn-powered file code model, you won't even notice when it asks for a CPU cycle.
Click the On/Off switch on the top-right of the below screenshot in order to see magic comments in a action (works perfectly with C# and VB).
While you can achieve bold/italic formatting by using the rich code, colleagues within your team will not be able to see that formatting. Markdown-based magic comments formatting is based on marking comment words with certain characters, which of course will be committed to SCC and thus be visible to others. Clearly, nice visual presentation will require Supercharger, but some markings are benign i.e. *italic text*, **bold text**, ~strikethrough text~ - see below:
Size can be specified per-line in terms of small, xsmall, large, xlarge. And line color in terms of two classic highlights for now (red and magenta). Plus this feature can be combined with inline formatting as explained in the paragraph immediately above!
Inserting separator lines can be extremely helpful in putting some order in larger files. Or even smaller ones - it's a feature that can speed up code navigation tremendously by placing visual hints here and there, of different colors and different pen widths.
Most of today's VS tools that provide spell checking work like in a word processor (they underline potential spelling mistakes, i.e. live checking). While it's definitely eye-catching and sometimes nice to have, these tools require that you open each code document and browse through it. The simplicity of a list with all words that are suspect from a spelling checker point of view would be much more effective. This is exactly what Supercharger's Spellist provides - and it does it in a very elegant manner:
You can execute the operation at a scope of your choice, specify the language as well as refine the output rules. Currently, dictionaries for English (US), English (UK), French, German, Italian and Spanish are provided, with more to come.
Making sure your UI text is correct from a language point of view is crucial to delivering a high-quality product. For most people this is identical to spell-checking - however, correct words can form bad or uninspired sentences and phrases, and that's something a spelling checker won't catch. Enter Supercharger's Phrasing Review tool which will output all phrases at a certain scope such that it will be much easier for you to check them.
Super Copy-Paste History Buffers
Copy. Copy. Copy again. Paste. Now, what if you could choose to paste from a previous copy operation? Necessarily in a very simple way, and by having a preview of the text that you are going to paste.
Enter Supercharger's Super Copy-Paste feature. It keeps track of the previous copy operations in a smart fashion and upon paste it alternatively offers you the possibilty to use an item from history instead of the current clipboard contents. In order to do so, immediately after pasting, hit the keyboard key corresponding to the history buffer index you want to use instead of what has been pasted from clipboard (highlighted in green). That is, hit 1 for example to use the first (i.e. most recent) history buffer, 2 for the immediately previous one, and so on.
Super Copy-Paste Indexed Buffers
Imagine you could have 9 different static buffers - that is, set them to whatever you want, and they keep their contents, independent of regular copy-paste operations.
Whenever you would need to paste one of them into code, all you have to do is type its 'paste' shortcut, for example <Ctrl+M, 1> (yes, that's a "keyboard chord", i.e. it is composed by two separate combinations pressed in sequence, in this case you first press <Ctrl+M>, then release these keys and press <1>) in order to paste the contents of buffer number 1, up to <Ctrl+M, 9> to paste the contents of buffer number 9.
In case you were wondering, setting a buffer is equally easy, you just have to add <Shift> to the first keyboard combination, that is, in order to set the contents for buffer number 5, you would select some code (the one you want to set the buffer to) and then press <Ctrl+Shift+M, 5>.
In the coding process, there always are pieces of code we type over and over. Using Super Copy-Paste Indexed Buffers like above may help, however there is another Supercharger feature called AutoText that's built with that in mind while adding even more flexibility. The idea is to be able to assign a short alias (usually 2-3 letters in length, like mb or exc for example) to a longer piece of code, then having the longer piece of code inserted in code whenever the alias is used with a special triggering system.
Let's consider an example, i.e. let's use AutoText to assign System.Windows.MessageBox.Show("") to a very short mb alias. The AutoText triggering system uses a double-dot sequence i.e. .. to enclose the alias - that is, typing ..mb.. in code will result in System.Windows.MessageBox.Show("") replacing the entire ..mb.. construct.
Moreover, AutoText uses the concept of macros - that is, special parameters which, once inserted in an item's code an enclosed within double dots, will cause for some special processing at insertion time. Currently, there are two kinds of macros
- Position/selection macros - in our example we could add ..C.. to specify the caret position i.e. System.Windows.MessageBox.Show("..C..") will mean that, after insertion, the text caret will be placed exactly where ..C.. is placed, such that entering a MessageBox text will be naturally easy. If we want to make that even more explicit, then we could use selection macros i.e. have the item defined as System.Windows.MessageBox.Show("..SB..Type text here..SE..") and at insertion time the text between ..SB.. (i.e. "selection begin") and ..SE.. (i.e. "selection end") will be selected, ready for being replaced by typing over it.
- Placeholder macros - these will be replaced at insertion time with a certain value, for example ..D.. will be replaced with the current date, ..MN.. will be replaced with the current member name (if any), ..CLP.. will be replaced with the current clipboard text contents (if any). The entire list is available in "Supercharger Options", AutoText / Macros.
AutoText items (filtered by language, eventually synchronized with the current document language) are listed and managed in the AutoText Manager:
Clicking on an item opens the AutoText Item Edit / Add New ('add new' is available from the popup menu over the AutoText Manager area):
How about a find-in-files with a revolutionary results highlighting system, i.e. results are highlighted depending on the whole word where the match is located. In the example below, matches of "document" in "WithDocumentationMode" are highlighted differently than those in "documentationMode" or "CommonWithDocumentationMode", because, of course, they may be of a completely different significance, isn't it? Also, each result line also comes with context, i.e. dimmed versions of the two previous and two next lines are also displayed (can be turned off), which get aggregated if necessary, i.e. you will never see unnecessary repetitions...
Now, what about noise in search results? In the example below, maybe you are not interested in matches in "documentation", but they're there anyway and they are obviously cluttering the output. Right click on such a match in the result list and you can add an exclude filter either for that instance only, or for all instances in that whole word! Or maybe you only want to see results in "documentation" without executing a new find - again, right-click on such a match and you can define an include filter based on that.
Multiple result sets are available, with auto-advance to the next set while limit not reached (max 10 sets)
... and results will be displayed in a new tab with its own filtering and options (i.e. in-editor highlighting, context lines visibility):
While the tools in this category won't take your breath away, you may find them time-saving sometime. For example, how about changing indent chars from spaces to tabs or vice-versa in bulk i.e. at solution or project-wide scope?
Or maybe you're in that typical save/load scenario where the "load" part initializes 10 variables with 10 stored values, then you have to re-write all those assignments by reversing the operands in the "save" part - what about automatically switching assignment operands in a selection? And all this done in a smart fashion, i.e. you will not see a constant switched in the place of an L-value :-)
Also, until a full-fledged code sorting subsystem arrives in Supercharger (it's planned!), there's a simple but effective sort fields in selection feature! Select a piece of code containing fields, click the "sort fields in selection" command and fields will be sorted by name, each of them retaining its corresponding comments and/or attributes. You can even select fields separated by other code elements (like methods or properties) and Supercharger will sort and consolidate all fields to an area starting at the position where the selection originally begun.
More to come!