views:

181

answers:

1

Hi,

When i work in VS2008, i use the Ctrl+K+D very often as it saves a lot of time.

But in CSS files, this command formats the document in a way i don't quite like.

For example when i auto format the document,

.Foo
{
width:1px;
height:2px;
}

However, i like to format tags this way, as it is much more easy to read (in my opinion):

.Foo
{ width:1px;
  height:2px; }

So, are there any way that i can implement this ?

The "Tag specific options" feature seems to be the thing that i need, but i am not quite sure how to do this.

Thanks.

+2  A: 

I just looked in the Visual Studio code formatting options and it appears that there are only three options you can choose from:

  • Compact rules
  • Semi-expanded
  • Expanded

None of these meet your requirements. The formatting options for C# (and other languages) are much more customizable.

Screenshot of the CSS text formatting options dialog in Visual Studio 2008

jessegavin
Unfortunately, you are right. Still the only way is the 'manual' one.
Batu