AllMargins 2012Note: 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 the 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:
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 UsersIn 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.
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 SettingsStoreImplThis 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 BlockTaggerImplThis extension is used by other extensions that help in determining the structure of a code file. OverviewMargin and OverviewMarginImplThese 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 MarginThis 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 MarginThis 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.) CaretMarginThis 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.
ErrorToMarksThis 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. MarkerToMarksPersonally 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).
StructureMarginThis 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.
StructureAdornmentThis 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.
Customizing AllMargins 2012Since 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.
Some Notes About AllMargins 2012When 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 EnhancementsAs 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.
|