VS編輯器中顯示列標誌線

 source: click here. thanks to the author saraford!

 

Update 12/2/2004:  Uploaded an image from Visual Studio 2005 Beta.  Note the image below shows guidelines at column numbers 5 and 30, but the regkey value is RBG(255,0,0), 4, 29.  The Guideline column numbers are 0-based in the registry.

 

Update 11/29/2004: I've corrected the two (embarrassing) typos below.  I must have had thanksgiving dinner on the brain at the time.  1.  The reg key is [HKEY_CURRENT_USER]/Software/Microsoft/VisualStudio/8.0/Text Editor (note the space between Text and Editor).  2. It's RGB, not RBG.  The example had a typo, but it is now corrected.

 

Guidelines at columns 5 and 30

 

Guidelines are visible column indicators for the VS Editor.  During the last test pass, I came across a test case named “Guidelines” which got my immediate attention.   I never heard of this before, so I made sure to spend extra time testing this cool, but hidden little feature during the Beta test pass.  I didn’t find any issues with it, so I feel it is safe to share.  Let me know if you run into any issues with it.

 

Warning!  To enable guidelines, you’ll need to modify your registry settings.   Follow the instructions below at your own risk.

 

Enabling Guidelines

 

First, shut down Visual Studio 2005 if already started.

 

Under

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

Create a string value called

Guides

 

Set Guides to the following

RGB(x,y,z) n1,...,n13

Where x,y,z are the RGB values and n is the column number.  You can have at most 13 guidelines.

 

For example,

Guides = RGB(128,0,0) 5, 80

will place a Red guideline at column numbers 5 and 80.

 

And now launch VS and open a text file.

 

Disabling Guidelines

 

An obvious no-brainer, just delete the Guides keys you created above.  Restart VS, and no more guidelines.

發佈了10 篇原創文章 · 獲贊 14 · 訪問量 23萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章