Creating Visual Guidelines inside Visual Studio

This is an old Visual Studio trick but it amazes me how many people just don’t know about it. It is possible to create visual guidelines inside Visual Studio so you’ll know when to start coding on a new line. This won’t force you to break up your code into multiple lines to make it more readable, this is just a guideline.

Here’s screenshot of what I mean:

clip_image002

To enable this feature of open regedit and navigate to:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Text Editor

Add a new String value called Guides.

Add the following value: RGB(128,0,0) 8, 50

The colours are RGB, so play around with the colour if you don’t like red. The two digits relate to where the two guidelines will be displayed in the text editor. This is a handy feature I use to keep my lines of code short which makes them more readable.

Enjoy!






About The Author

Malcolm Sheridan is a Microsoft awarded MVP in ASP.NET and regular presenter at conferences and user groups throughout Australia. Being an ASP.NET Insider, his focus is on web technologies and has been for the past 10 years. He loves working with ASP.NET MVC these days and also loves getting his hands dirty with JavaScript. He also blogs regularly at DotNetCurry.com. Follow him on twitter @malcolmsheridan

No comments: