Extensions

Visual Studio 2010 Extensions:

You can find all these extensions by searching the Visual Studio Gallery for Noah Richards, and the source for each is available on my github page.


Align Assignments

This extension adds a command, "Align Assignments", that is bound to Ctrl+Alt+] by default (and placed in the Edit menu). This command helps you line up assignments by aligning the '=' on each line.

You can use this in two ways:

  1. Place the caret in the middle of a set of assignments and press Ctrl+Alt+]. All the lines in that block (lines above and below that also contain '=') will be lined up.
  2. Same as #1, but make a selection first that spans multiple lines. This behaves similarly, except that lines that aren't in the selection won't be changed. You can use this if you only want to align part of a block.

If you are using C#, you should make sure the following option is enabled, so that C# auto-formatting doesn't undo the alignment:

 Tools->Options->Text Editor->C#->Formatting->Spacing->"Ignore spaces in declaration statements"

Markdown Mode

This is an extension for writing files in the Markdown syntax. It currently (version 0.1) has the following features:

  • Syntax highlighting (for Markdown and HTML)
  • A live preview window of the file you are editing
  • A rudimentary margin with buttons for showing the preview window and copying the HTML-ized version of the file you are editing to the clipboard, as well as allowing you to navigate the structure of the document.
  • Outlining support (collapse sections of the document)

Spell Checker

This extension, written by Roman Golovin and I, provides spell checking support for comments and string in code files and for all content in plain text files. Spelling errors show up with squiggles and use smart tags for suggested fixes (or to ignore that error). Smart tags can be activated with ctrl-. (period).

This extension mixes well with Markdown Mode, providing spell checking while editing markdown files.


Background colors for XML doc comments, with the extension running

Background Color Fix (VS2008 parity)

This extension restores the background color behavior in Visual Studio 2008 behavior, in two ways:

  1. Removes the gap between lines that have the same background color for text elements.
  2. Extend the background color to the edge of the view for elements that go to the end of the line.

The one caveat is that the extension will occasionally hit false positives for background colors that should go to the edge of the viewport.


Screenshot of the selection foreground extension.

Selection Foreground (VS2008 parity)

This extension restores the ability to set the selected text foreground color in Visual Studio 2010.

In order to change it from the default (white), change the foreground color for the "Selection Foreground" item in Tools->Options->Environment->Fonts and Colors, which appears towards the end of the list, in the portion that is sorted alphabetically.

Because of the way the extension works, changing the selection may be slightly slower than running without the extension installed.


Go To Definition

This extension introduces a behavior found in a couple of other editors (like Eclipse), where holding down the control turns identifiers in a file into hyperlinks. When you click on these hyperlinks, you are taken to the definition or declaration of an identifier or type. This is the same behavior you get from using the regular Go To Definition command (bound to F12 in Visual Studio), but this extension allows for quick and simple browsing of a codebase by looking through definitions: your left hand never leaves the control key, and your right hand never leaves the mouse.


Italic Comments

This extension changes comments to use an italic and non-proportional font. One of the new features in the Visual Studio 2010 editor is that a file can contain runs of text with different fonts, so you can mix proportional and non-proportional fonts like this. Also, this changes the opacity of certain comments very slightly, showing both the ability to change opacity of fonts dynamically.

Because the Fonts and Colors dialog was not updated for Visual Studio 2010, the only way to make changes like this is through an extension, but you can use the source code to learn how to add something like this to your own extension.


Triple-click

This simple extension makes triple-click select a whole line at a time. Holding down the third-click and dragging also selects whole lines as you drag around, much line double-click and dragging selects words at a time.


Fix Mixed Tabs

This extension is for cases where a file has a mix of tabs and spaces uses for indentation, which happens sometimes by accident or when multiple people are working together. The extension offers to help by showing a non-obtrusive margin (not a modal dialog), and gives you the option to Tabify, Untabify, never show the margin again for that file (until the file is re-opened), or just close the margin for now. The file is re-checked when it is either loaded or saved.


Gradient Selection

This extension restores the selection gradient from Visual Studio 2010 Beta 1. After Beta 1, the editor went back to a more traditional/flat selection, due to performance concerns. Though the gradient can helpful in providing visual clues about the selection and the relative position of the viewport to the body of the selection, using a gradient like this forces the entire selection to redraw every time it changes. Still, by popular demand, this extension restores the behavior, and you can use the source code to get an idea of how to write you own extension for changing the selection in other ways.


CSS Is Less

This extension makes Less files open with the CSS language service.