Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 One function parameter per line with alignment
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cpp_john
New Member

Italy
4 Posts

Posted - Feb 07 2015 :  04:27:39 AM  Show Profile  Reply with Quote
Would it be possible to implement a formatting feature that converts a function signature written with each parameter on the same line like this:



void DoSomething(int abc, int def, int xyz)
{
    ...
}



or with parameters distributed on different lines with multiple parameters per line, like this:



void DoSomething(int abc, int def, int longName,
    int anotherParam, DWORD foo, int bar)
{
    ...
}



into another form in which there is one parameter per line, and the parameters are horizontally aligned properly, like the following example?



void DoSomething(int abc,
                 int def,
                 int xyz)
{
    ...
}



This feature could be applied to:



  • current selection: reformat one or more functions in the current selection


  • current file: reformat all functions in the current file





Thank you very much.

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Feb 07 2015 :  4:13:06 PM  Show Profile  Reply with Quote
Unfortunately we don't have any plans to do code formatting. It is a complex area, since everyone tends to have a different view of the correct formatting for their code.

Depending on the IDE you are using you could look into an IDE macro to help with this. In VS2010, there is a sample macro called LineEmUp, which should help to get you started.

Alternatively you could consider a third-party extension or external program, e.g. GC GreatCode, Uncrustify, and StyleManager.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000