Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to automatically reset tabs in sourcecode

0 views
Skip to first unread message

John Devlon

unread,
Dec 6, 2009, 9:25:04 AM12/6/09
to
Hi

I worked for several years with visual studio and i'm loving it.

One thing I noticed is that, when creating asp pages, the source code is but
of a mess... Tabs are automaticlly at random inserted. Opening statements
are in most causes not on the same tab level as the closing statements.

Is there a function or plugin to clean up the number of tabs inserted before
each line of code to make the code more readable?

Thanks

Tim

Peter Duniho

unread,
Dec 6, 2009, 12:26:48 PM12/6/09
to

VS has a "reformat code" menu command. I don't recall off the top of my
head exactly where it is, but it should not be hard to find.

It works well in the editors I've used it with (C#, XML, VB.NET, to name
a few)...I don't know about your ASP.NET code, but it probably handles
that too, whatever you mean specifically by that.

Pete

Tom Dacon

unread,
Dec 6, 2009, 1:03:01 PM12/6/09
to

"John Devlon" <johnd...@hotmail.com> wrote in message
news:49PSm.123965$yM2....@newsfe10.ams2...
> Hi

> Is there a function or plugin to clean up the number of tabs inserted
> before each line of code to make the code more readable?
>
> Thanks
>
> Tim

Open the file in the IDE editor and then Ctrl-K Ctrl-D to reformat the
indentation.

Tom Dacon
Dacon Software Consulting

Family Tree Mike

unread,
Dec 6, 2009, 2:08:10 PM12/6/09
to

If your question is how does the automatic formatting get done, and can
it be customized, then look to the following:

1. Menu "Tools", then "Options"
2. On the left, select/expand "Text Editor", "HTML", "Format"
3. Click the button on the right "Tag Specific Options"
4. Alter either the default settings, or expand the "Client HTML Tags"
or "ASP.Net Controls" to find options specific to a tag.

This lets you customize the behavior when the doc is reformatted by you
or the editor.

--
Mike

0 new messages