views:

255

answers:

2

I'm using Visual Studio to develop a C/C++ library. I would like to know if there is a way to customize the autoformat tool (Ctrl+K,F) so that:

  • It automatically break lines that are bigger than 120 columns

  • Format a function/method parameter the following way:

    void myFunction(int parameterA,
            float parameterB,
            string paramterC)
    
  • Format the brackets the following way:

    void myFunction()
    {
         // Code goes here...
    }
    

To summarize, I want something similar to what Eclipse does with it's autoformat (Ctrl + Shift + F) that can be customized by editing a XML file.

A: 

Tools | Options | Text Editor | C++

That is all I know that lets you edit how the code is formatted and the auto formatter uses these options (as few as they are).

AlexC
+1  A: 

If those options are not good enough for you get UniversalIndentGUI it is a frontend for a whole slew of code formatting engines, you should be able to get the style that you want from it

Harald Scheirich