Skip to content
| Marketplace
Sign in
Visual Studio>Tools>AllMargins 2012
AllMargins 2012

AllMargins 2012

fourpastmidnight

|
34,824 installs
| (16) | Free
This extension contains the OverviewMargin and several other extensions of that margin.
Download

AllMargins 2012

Note: If you like this extension, I'd appreciate if you could take a few seconds and give a quick review. Thanks!!

Update Release 2.8.2 (10/24/2013)

This release is for Visual Studio 2013 users. If you're not using Visual Studio 2013, feel free to skip this update. Fixes an installation issue with the StructureMargin extension in Visual Studio 2013 RTM.

Thanks to SpinDisc, Martijn Carol, and Markus Springweiler for pointing this out.

As always, if you encounter any problems, please contact me on the Q&A tab. Thank you all for your support, feedback, and ratings.

Update Release 2.8.1 (09/06/2013)

This release is for C/C++ users. The original AllMargins extension had no support in the C++ parser for theunion keyword. This had two side-effects: 1) C/C++ unions would have a line drawn next to them denoting an 'Unknown' block type; 2) and if a non-transparent MethodSeparatorLine color is set, then method separator lines appear underneath C/C++ unions. This release adds support for recognizing C/C++ unions.

If you are not a C/C++ user of this extension and/or do not use method separator lines, it is not necessary that you update to this latest version.

Thanks to Martin for pointing this out!

Update Release 2.8 (09/01/2013)

I've finally released a new version of this extension. This update adds preliminary support for the upcoming Visual Studio 2013. What's most notable about this release however, is that it's mostly a bug-fix release that many of you have been waiting on for a long time now. Here's what's been fixed:

Extension option name clashes with Visual Studio 2012 Productivity Power Tools

When I saw that David Pugh's original AllMargins extension was removed from the Visual Studio Gallery, I was really disappointed. What I didn't know is that many of the features of that extension were ported to the Visual Studio 2012 Productivity Power Tools.

When the original extension was migrated to the VSPPT, the option names were kept the same. Consequently. when I released AllMargins 2012 as a re-release of the original AllMargins with support for Visual Studio 2012, the option names with the two extensions are exactly the same.

(As an aside, two of my most favorite features of AllMargins that weren't ported to the VSPPT are: the StructureMargin (showing the structure of your code via lines in the scrollbar—there's a map feature in VSPPT, but I like the more minimalistic style of the StructureMargin); and the StructureAdornment, which draws different colored lines in the editor for namespaces, classes, methods, conditionals, and loops—makes visualizing your code a breeze!)

In this release, I've renamed all the names used for storing and retrieving the settings to be used with this extension.This has one major implication: You will want to take note of all the settings in the Registry under HKLM\Software\Microsoft\Visual Studio\{version}\Text Editor. Installing this update will cause new settings to be written into the registry at that key with their default values (the old settings WILL NOT be overwritten).

Defining a Method Separator Color now works as expected.

One issue was that the option name that is in the registry was mis-typed (though this is more cosmetic than an issue). I've corrected the option name. See the table below.

The root of the issue was that even if you defined a non-transparent color for the method separator line, the line was always drawn using the color used for adorning Method blocks. This has been corrected in version 2.8.

Closing an ASPX document while using this extension no longer causes Visual Studio 2012 to crash.
This was only an issue with this extension on Visual Studio 2012. This issue has been resolved.

NOTE: Please see the table below for updated registry key value names, as they have changed in this version. The table now shows the old value name versus the new value name and its default value.

NOTE: New default values will be used the first time this extension starts. If you have customized the colors used, you will need to manually edit the registry according to the table below to restore your customizations.

I plan on taking a look into creating a Visual Studio Tools Options page so that options can be customized from within Visual Studio, including enabling/disabling features and customizing the colors used.

I hope you all enjoy using this extension.

Future Directions Request (02/2013)

I re-released David Pugh's AllMargins extension about a month ago. I was motivated to release an update of the extension that works on Visual Studio 2012 because the implementation of the original enhanced scrollbar in the Visual Studio Productivity Power Tools for Visual Studio 2010 was lacking and AllMargins fit the bill; but with the release of Visual Studio 2012, AllMargins was no longer being maintained on its own nor being updated.

Because of the original poor implementation of the VSPPT enhanced scrollbar, I never even tried it in the VSPPT for Visual Studio 2012 until a user of AllMargins 2012 reported that some of the VSPPT settings clashed with AllMargins 2012 settings. This prompted me to revisit the VSPPT enhanced scrollbar. David Pugh has indeed ported much of the original AllMargins scrollbar implementation to the Enhanced Scrollbar in VSPPT; and it even has a few nice extras.

As users of VSPPT will know, many options for the VSPPT can be changed within the Visual Studio Options dialog, and this is true for the enhanced scrollbar. This largely negates the need for many of the AllMargins (and AllMargins 2012) extensions--hence why David Pugh is no longer maintaning the original AllMargins extension.

Two missing features of the VSPPT enhanced scrollbar are the Structure Margin and, though not a margin but still extremely helpful, the Structure Adornment extension (this extension draws the lines in the editor for methods, classes, loops, etc.).

I'm considering pulling AllMargins 2012 off of Visual Studio Gallery, but releasing the Structure Margin and Structure Adornment features as a stand-alone extension. I'd appreciate any feedback you may have. Please leave any comments on the Q and A tab.

AllMargins is Back! (01/16/2013)

I’m pleased to announce to the Visual Studio community that AllMargins is back (asAllMargins 2012) and has full Visual Studio 2012 support!

As many users of AllMargins may know, David Pugh at Microsoft originally published this extension to Visual Studio Gallery for Visual Studio 2010. This extension has personnally been one of my most favorite, indispensible extensions.

Some time ago after the release of version 2.6, David Pugh pulled the AllMargins extension off of Visual Studio Gallery. It’s been reported that he ported much of this functionality into the Visual Studio Productivity Power Tools (VSPPT). While I love the VSPPT and have it installed, I am not a huge fan of that extension’s implementation of the “enhanced scrollbar”. I find it too cramped and less useful than David Pugh’s originalAllMargins extension.

David Pugh always had the source code for AllMargins available for download. I updated the last available source code release to conform with version 2.6 ofAllMargins (the last available release of AllMargins that was on Visual Studio Gallery) and upped the version to 2.7.

Important Information for Visual Studio 2010 Users

In order to upgrade to this new release of AllMargins on Visual Studio 2010, you will need to uninstall the originalAllMargins extension. This is because the unique identifier for AllMargins 2012 is different than the one for the original AllMargins, so it will not show up as simply an updated version ofAllMargins and I don’t know what would happen if you tried to run both side-by-side. I know it’s a bit of a pain to have to uninstall the original, but trust me; this is a good thing for your safety! (You wouldn’t want just anybody to hijack someone else’s extension and possibly replace it with malicious code on your machine, would you? Especially given the fact that many developers run Visual Studio as Administrator from time-to-time!)

What is AllMargins 2012?

For those of you who have never used the original AllMargins extension, this is where you find out what all the buzz is about!

AllMargins 2012 is a wonderfully new way to view your source code documents allowing you to quickly and easily move about (i.e. scroll) within them.AllMargins 2012 gives you an at-a-glance view of the structure of your document, highlighting source code document errors, warnings, breakpoints, and much, much more.

A partial full screen view of AllMargins 2012 running in Visual Studio 2012 with the Light theme.

 

A partial full screen view of AllMargins 2012 running in Visual Studio 2012 with the Dark theme.

 

The original AllMargins was composed of several sub-extensions, each of which you could install separately (all of the sub-extensions were also available as separate extensions for download on Visual Studio Gallery). This is not an option for AllMargins 2012 (for Visual Studio 2012 users), however, individual features ofAllMargins 2012 can be disabled. Each of the sub-extensions will be briefly described below. Please note that the names of the sub-extensions, while maybe not pretty, are the original names used by David Pugh. I can’t stress enough that this is a re-release of his extension updated so that it can be used with Visual Studio 2012 (but still maintains support for Visual Studio 2010).

SettingsStore and SettingsStoreImpl

This extension is part of every other extension included with AllMargins 2012 and is responsible for getting the settings used by all of the other extensions.

BlockTagger and BlockTaggerImpl

This extension is used by other extensions that help in determining the structure of a code file.

OverviewMargin and OverviewMarginImpl

These extensions create a scrollbar type margin on the right-hand side similar to the standard Visual Studio vertical scrollbar, except that it maps to the entire document, optionally including collapsed (elided) code blocks. When the optionExpand Elisions is turned on (the default setting), collapsed sections of code are shown in a translucent red color in the overview margin. When placing your cursor over theOverviewMargin, a tooltip window appears showing the code at that place in the code document. You only need to click theOverviewMargin and your code document will scroll to center itself on that region of the document! You could turn off the default Visual Studio vertical scrollbar using this extension in its place! Clicking on theOverviewMargin on a collapsed section of code causes the collapsed section to be scrolled into view. Double-clicking the collapsed section of code scrolls the collapsed code into viewand expands it. Right-clicking the OverviewMargin allows you to turn off showing collapsed code blocks and the tooltips.

The OverviewMargin also acts as a container for other margins that display information for a code file. TheOverviewMargin extension contains two such margins: the OverviewChangeTracking Margin and the OverviewMarks Margin.

OverviewChangeTracking Margin

This margin is much like the change tracking margin shown on the left-side of the editor that tracks changes to the code document. The difference is that theOverviewChangeTracking Margin maps to the entire document whereas the left-side margin maps only to the current viewport.

OverviewMark Margin

This allows 3rd parties to draw colored marks on the margin to indicate positions of interest within the document. (See theErrorsToMarks, CaretMargin, StructureMargin, andMarkersToMarks extensions below.)

CaretMargin

This margin utilizes the OverviewMarks Margin to draw marks in the margin that correspond to the current caret (i.e. text cursor) location, additionally highlighting all words that match the word the caret is on.

 

The OverviewMargin tooltip, along with the CaretMargin, ErrorsToMarks margin, and StructureMargin running in Visual Studio 2012 with the Light theme.

 

The OverviewMargin tooltip, along with the CaretMargin, ErrorsToMarks margin, and StructureMargin running in Visual Studio 2012 with the Dark theme.

ErrorToMarks

This extension also utilizes the OverviewMarks Margin to display indicators that correspond to errors and warnings in your code document. This makes finding coding errors and warnings a breeze! See a code error, simply click the margin near the error mark and scroll it into view.

MarkerToMarks

Personally one of my favorite OverviewMarks Margin, this margin displays marks at locations corresponding to bookmarks and breakpoints in the editor. All legacy Visual StudioVsTextMarkers that have a specified glyph and background color are displayed in this margin when it is enabled (the default).

 

The OverviewChangeTracking Margin with also the CaretMargin, ErrorsToMarks margin, MarkersToMarks Margin and StructureMargin running in Visual Studio 2012.

StructureMargin

This margin once again utilizes the OverviewMarks Margin and shows the structure of the code document by using variously colored lines. For example, green lines denote conditional statements while red lines denote loop construct statements. The colors used in this margin match the colors used by the StructureAdornment extension (by default, but this can be changed; see below for more on theStructureAdornment extension) and give you an at-a-glance view of the overall structure of your code document! In addition, placing your mouse cursor over the structure margin also displays a tooltip of the current structure of the document at that position.

 

StructureMargin tooltip running in Visual Studio 2012 with the Light theme.StructureMargin tooltip running in Visual Studio 2012 with the Dark theme.

StructureAdornment

This extension enhances the text editor by displaying differently colored vertical lines beside various blocks of code. For instance, a green line is drawn beside conditional blocks, while a red line is drawn beside loop construct blocks.

 

StructureAdornment running in Visual Studio 2012 with the Light theme. StructureAdornment running in Visual Studio 2012 with the Dark theme.

 

Customizing AllMargins 2012

Since this is a re-release of the original AllMargins extension with Visual Studio 2012 support, the customization options remain the same as with the original extension. Unfortunately, the original extension did not provide any means of changing the options from within Visual Studio, but required changes to be made to values in the Windows registry. I hope to change this in a future release. The values used to customize the extension(s) are outlined below. All options are located under the following registry key: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\{version}\Text Editor, where{version} is the major version number of Visual Studio where the extension is installed. If any of the values shown in the table below are changed while Visual Studio is running, currently open text editors will not update with the new values. However, code documents that are opened after changing any of the values below will display with the updated values. So, if you close a text editor that was open prior to making a change to one of the values below, reopening the document will result in the text editor displaying the extensions with the modified values.

09/01/2013 NOTE: This table has been updated for version 2.8. See the release notes above.

Option Registry Value NameDescriptionDefault Value
OverviewMargin Options
v2.8: AllMargins2012.Overviewmargin.ChangeTrackingMarginEnabled
v2.7: OverviewMargin/ChangeTrackingMarginEnabled
Determines whether the change tracking margin is displayed.True
v2.8: AllMargins2012.OverviewMargin.MarkMarginEnabled
v2.7: OverviewMargin/MarkMarginEnabled
Determines whether the mark margin is displayed.True
v2.8: AllMargins2012.OverviewMargin.ExpandElisionsInOverviewMargin
v2.7: OverviewMargin/ExpandElisionsInOverviewMargin
Determines whether collapsed code blocks are shown as expanded in the overview margin.True
v2.8: AllMargins2012.OverviewMargin.OverviewMarginPreviewSize
v2.7: OverviewMargin/OverviewMarginPreviewSize
Sets the number of lines to show in the tooltip for the overview margin. If 0, the tooltip will not be displayed when hovering the mouse cursor over the OverviewMargin.7
v2.8: AllMargins2012.OverviewMarginImpl.ChangeTrackingMarginWidth
v2.7: OverviewMarginImpl/ChangeTrackingMarginWidth
Sets the width of the ChangeTrackingMargin (in pixels).6
v2.8: AllMargins2012.OverviewMarginImpl.MarkMarginWidth
v2.7: OverviewMarginImpl/MarkMarginWidth
Sets the width of the MarkMargin (in pixels).6
v2.8: AllMargins2012.OverviewMarginImpl.ElisionColor
v2.7: OverviewMarginImpl/ElisionColor
An ARGB color value that sets the color to be used to highlight elided text (i.e. collapsed code blocks). If the Alpha channel is set to 0, then collapsed code regions are not highlighted in the margin.#40FF4F4F
Example
v2.8: AllMargins2012.OverviewMarginImpl.OffScreenColor
v2.7: OverviewMarginImpl/OffScreenColor
An ARGB color value that sets the color to be used to highlight portions of the file not shown in the editor. If the Alpha channel is set to 0 then off screen portions of the file are not highlighted differently in any way.#30000000
Example
v2.8 AllMargins2012.OverviewMarginImpl.VisibleColor
v2.7: OverviewMarginImpl/VisibleColor
An ARGB color value that sets the color to be used to highlight portions of the file shown in the editor. If the Alpha channel is set to 0, then the visible portion of the document is not highlighted in the editor.#00FFFFFF
Example
CaretMargin Options
v2.8: AllMargins2012.CaretMargin.MarginEnabled
v2.7: CaretMargin/MarginEnabled
Determines whether the CaretMargin should be displayed.True
v2.8: AllMargins2012.CaretMargin.MarginEnabled
v2.7: CaretMargin/MarginWidth
Sets the width of the CaretMargin (in pixels).5
v2.8: AllMargins2012.CaretMargin.CaretColor
v2.7: CaretMargin/CaretColor
An ARGB color value that sets the color to be used to draw the location of the caret (i.e. text cursor). If the Alpha channel is set to 0, then the text cursor is not highlighted in the margin.#FF0000CD
Example
v2.8: AllMargins2012.CaretMargin.MatchColor
v2.7: CaretMargin/MatchColor
An ARGB color value that sets the color to be used to draw the location of matching words in the Caret Margin. If the Alpha channel is 0 then matching words are not displayed in the margin.#FF9370DB
Example
v2.8: AllMargins2012.CaretMargin.AdornmentMatchColor
v2.7: CaretMargin/AdornmentMatchColor
An ARGB color value that sets the color to be used to highlight matching words in the text editor. If the Alpha channel is 0 then matching words are not highlighted.#409370DB
Example
StructureMargin Options
v2.8: AllMargins.StructureMargin.GapWidth
v2.7: StructureMargin/GapWidth
Sets the width of the gap between the lines used to show the various code block scopes.1
v2.8: AllMargins2012.StructureMargin.LineWidth
v2.7: StructureMargin/LineWidth
Sets the width of the lines used to show the various code block scopes.2
v2.8: AllMargins2012.StructureMargin.ClassColor
v2.7: StructureMargin/ClassColor
An ARGB color value that sets the color to be used to show the code block scope of class definitions (and in C#, namespace). If the Alpha channel is set to 0, then class-scoped blocks are not displayed in the margin.#FF000000
v2.8: AllMargins2012.StructureMargin.ConditionalColor
v2.7: StructureMargin/ConditionalColor
An ARGB color value that sets the color to be used to show the scope of conditional code block scopes. If the Alpha channel is set to 0, then conditional code block scopes are not displayed in the margin.#FF008000
v2.8: AllMargins2012.StructureMargin.LoopColor
v2.7: StructureMargin/LoopColor
An ARGB color value that sets the color to be used to show the scope of loop construct code blocks. If the Alpha channel is set to 0 then loop construct code block scopes are not displayed in the margin.#FFFF0000
v2.8: AllMargins2012.StructureMargin.MethodColor
v2.7: StructureMargin/MethodColor
An ARGB color value that sets the color to be used to show the scope of method code blocks. If the Alpha channel is set to 0, then method code block scopes will not be shown in the margin.#FF0000FF
v2.8: AllMargins2012.StructureMargin.UnknownColor
v2.7: StructureMargin/UnknownColor
An ARGB color value that sets the color to be used to show the scope of unknown code blocks. If the Alpha channel is set to 0, then unknown code block scopes will not be shown in the margin.#FF808080
v2.8: AllMargins2012.StructureMargin.MarginEnabled
v2.7: StructureMargin/MarginEnabled
Determines whether the StructureMargin should be displayed.True
v2.8 AllMargins2012.StructureMargin.MarginWidth
2.7: StructureMargin/MarginWidth
Sets the width of the StructureMargin (in pixels).25
v2.8: AllMargins2012.StructureMargin.MethodEllipseColor
v2.7: StructureMargin/MethodEllipseColor
An ARGB color value that sets the color to be used to draw the ellipse that shows the scope of method bodies. If the Alpha channel is set to 0, then the ellipse is not shown.#150000FF
StructureAdornment Options
v2.8: AllMargins2012.StructureAdornment.LineWidth
v2.7: StructureAdornment/LineWidth
Sets the width of the lines used to show the various code block scopes in the text editor.1
v2.8: AllMargins2012.StructureAdornment.ClassColor
v2.7: StructureAdornment/ClassColor
An ARGB color value that sets the color to be used to show the code block scope of class definitions (and in C#, namespace definitions). If the Alpha channel is set to 0, then class-scoped blocks are not displayed in the text editor.#FF000000
v2.8: AllMargins2012.StructureAdornment.ConditionalColor
v2.7: StructureAdornment/ConditionalColor
An ARGB color value that sets the color to be used to show the scope of conditional code block scopes. If the Alpha channel is set to 0, then conditional code block scopes are not displayed in the text editor.#FF008000
v2.8: AllMargins2012.StructureAdornment.LoopColor
v2.7: StructureAdornment/LoopColor
An ARGB color value that sets the color to be used to show the scope of loop construct code blocks. If the Alpha channel is set to 0 then loop construct code block scopes are not displayed in the text editor.#FFFF0000
v2.8: AllMargins2012.StructureAdornment.MethodColor
v2.7: StructureAdornment/MethodColor
An ARGB color value that sets the color to be used to show the scope of method code blocks. If the Alpha channel is set to 0, then method code block scopes will not be shown in the text editor.#FF0000FF
v2.8: AllMargins2012.StructureAdornment.UnknownColor
v2.7: StructureAdornment/UnknownColor
An ARGB color value that sets the color to be used to show the scope of unknown code blocks. If the Alpha channel is set to 0, then unknown code block scopes will not be shown in the margin.#FF808080
v2.8: AllMargins2012.StructureAdornment.MethodSeparatorColor
v2.7: StructureAdornment/MethodSeparatorColorId
An ARGB color value that sets the color to be used to draw a horizontal separator line at the end of a method. If the Alpha channel is set to 0, then method separator lines are not drawn in the text editor. This feature of the extension is turned off by default (i.e. the Alpha channel is 0).#000000FF


(when transparency is 0%; the default is 100% transparent, i.e. off)
v2.8: AllMargins2012.StructureAdornment.Enabled
v2.7: StructureAdornment/Enabled
Determines whether structure adornments are displayed in the code editor.True

 

Some Notes About AllMargins 2012

When installing this extension in Visual Studio 2012, you will only see the AllMargins 2012 extension listed in the Visual Studio 2012 Extension Manager. This is different than the experience in Visual Studio 2010 and is expected. It appears Microsoft may have fixed a "bug" with extensions that contain other extensions so that only the main/parent extension is listed in the Extension Manager.

Users of Visual Studio 2010 who install AllMargins 2012 will get the same experience as if they had installed the originalAllMargins extension: namely, all the "sub-extensions" (i.e. CaretMargin, SettingsStore, SettingsStoreImpl, etc.) will appear as installed in the Extension Manager, and again, is to be expected.

Planned Enhancements

As has been stressed throughout this exposé on AllMargins 2012, this is a simple update of the originalAllMargins extension to support Visual Studio 2012. While the extension is great just as it is, there are some planned enhancements to the extension to make the overall user experience even more pleasurable. The following list, while not exhaustive, contains the enhancements I think would have an immediate impact on the user experience of this extension. If you can think of more, please leave a comment.

  • Provide a means to change the extension options from the Visual Studio Options dialog.
  • Provide options for the StructureMargin and StructureAdornment extensions to highlight other types of code regions, including:
    • For C# users, providing a different color for namespace code blocks
    • Try/Catch/Finally code blocks (they currently show up as Unknown)
    • Anonymous Method/Inline Delegate code blocks (should they be the same color as normal mehods?)
    • For C# users, using code blocks
    • Providing different colors for for, foreach, while, and do…while loops
      • Let me know if there’s interest in this. Of course, you could set them all to the same color to achieve the same behavior as the current extension.
  • If current VB and C/C++ users can think of additional features they’d like to see in this extension, please let me know.
  • Would F# users find any of this functionality useful?
  • Of course, if there’s anything else you’d like to see, drop me a line!
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft