c++ - Format(line wrapping) constructor initializer list in Eclipse CDT -


I now tried to find a solution for 30 minutes and no one found the code style in the CDT I am trying, so it gives me:

  MyClass :: MyClass (): var1 (1), var2 (2), var3 (3) {} < < Pre>  MyClass :: MyClass (): var1 (1), var2 (2), var3 (3) {}   instead of / code> 

/ Pre >

But I could not find any option to do this.

The only 'initial list' option I can find is actually for arrays and therefore is not useful for me.

My question is, am I losing the right place? Is there a plug-in that makes better C ++ code better than CDT?

@Eric provides manual solutions, but to make this setting automatic, you have to modify the module assumption is required.

Click on:
Window -> Preferences

Go to: C / C ++ -> Code Style -> Formatter

Here, the first thing you need to do is create a new profile

tab:
Line wrapping

Go to:
Function declarations -> Constructor initial list

below, you have to set:

  • Line wrapping 'S policy: Wrap all the elements, each line has a new row . Indentation policy
  • Li> ul>

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -