There is a nice little hidden feature to add carriage return guide lines in the Visual Studio’s code editor. These guide lines can be used as an easy way to keep a consistent line breaking in your code.
Warning: always backup your registry before doing any manual modification.
Open the registry editor (regedit) and navigate to the following key:
If it does not already exist, create a new String value called Guides
The format of the value is the following:
RGB( [Red Value], [Green Value], [Blue Value] ) guide1 guide2 …
The Red, Green and Blue value indicate the color of the guides while the positions of the guides are indicated in the guideN entries.
Here is an example that I use (I like a soft color that stays very discreet that still does the job without the In your face effect !):
- RGB(178,255,145) 120 140
This creates two guide lines in a soft green at 120 and 140 characters. And below is the result: