views:

48

answers:

1

Is there a way to prevent this from happening?

Namespace testing
    Public Module TestModule
        Public testobj As New test
    End Module
End Namespace

It is extremely annoying to have to start out two tabs to the right on new code. Is there anyway to disable auto-indenting just for namespace declarations in visual studio 2008?

+2  A: 

There is no setting for turning off specific block type indentations. (There is a setting for C# to turn off block indenting altogether, but again, not specific to certain block types like namespace blocks).

You shouldn't need to hit tab twice though - when you press "enter" on a line of code, it should automatically indent you to where the last line was indented to.

And no matter how you type in your code, it's just a quick keystroke to auto-format the whole document (Ctrl-K followed by Ctrl-D). So you can ignore idents until you're done typing and then auto-format.

womp