Talking about Visual Studio tips and tricks

This helps with one of my greatest peeves, that of writing too much code on one line. In the age of huge monitors and people that use freakishly small fonts the line length of code can quickly become unreadable for many users.

 

Quote

Visual Studio tips and tricks

Column Guides in Visual Studio

A lot of coding guidelines specify the maximum length for a line of code. For instance in the CLR, Microsoft like to keep lines of code under 110 characters long. Visual Studio has a feature which lets you display a vertical line at the column of your choosing to help visually see when a line is getting too long. This does involve mucking in the registry so the usual disclaimers apply.

To enable this feature, set:

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\Text Editor]

"Guides"="RGB(192,192,192) 110"

The values passed to the RGB function let you specify the color of the line, and the number following tells Visual Studio at what column to display it. The

Advertisements
This entry was posted in Visual Studio. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s