views:

75

answers:

1

I am having a problem editing VB.NET .aspx pages in Visual Studio 2008. If I edit a line that is flush against the left margin, Studio automatically indents it 4 spaces, and there is no way to undo it! I am forced to save the file with that 1 line I edited indented differently than all the other lines!

Edit: How do I turn this off?

+2  A: 

In Visual Studio go into the Tools>Options menu, scroll down to TextEditor>Basic>VBSpecific and uncheck the Pretty Listing checkbox and it should stop doing that. Or you could also use CRTL + "k" + "d" to reformat the entire document based on the options you have set.

Jay13
Also under TextEditor>Basic>Tabs set the tab size to the correct size (if the line you edit will be indented differently -> your editor has different indentation settings than the IDE of the original author of the code)
Ando