How to disable automatic indentation when entering ":" in Visual Studio 2008

When I write a class constructor, typing :to run the C ++ constructor initialization list, Visual Studio discards the line when it is right after the directive namespace. Also, when I type ::(region resolution), Visual Studio backtracks from a line that I found very annoying, since the indentation was correct in the first place, and I always need to undo the indentation of Visual Studio.

Example:

Here is what I typed:

namespace XY {

MyClass::MyClass()

Now I type <space>:, and VS indentation:

namespace XY {

     MyClass::MyClass() :

which is not what i was thinking about.

This behavior - strictly speaking - is correct, in accordance with the rules of the MSVC "Indent" option. But in this context, I do not want this.

? , .

+3
2

namespace:

namespace XY {

MyClass::MyClass() 

, MSVC .

Mea culpa.

0

VS9: "" > "" > " " > "C/++" > "". , , "". "", .

+1

Source: https://habr.com/ru/post/1769522/


All Articles