Formatting options

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Formatting options

Postby SylwesterZ » December 18th, 2016, 2:03 pm

Hi,
Is there a possibility to full format code with respect to indents, spaces and newlines before/after code elements?
Eg. before formatting:
Code: Select all
if ( $test=='abcd' ) {
myfunc ( );
}

should be after:
Code: Select all
if ($test == 'abcd')
{
    myfunc();
}


Now the code formatting has only indented myfunc().
SylwesterZ
 
Posts: 2
Joined: December 18th, 2016, 1:57 pm

Re: Formatting options

Postby Miloslav Beno » December 19th, 2016, 12:42 pm

Hi,

Thanks for the post. Currently formatting is just doing what's 100% sure it's desired formatting. With the opening backslash, someone would like it at the same line as if, someone else wants it bellow. So formatting just leaves it where you place it.

However we do have plans to make formatting much more customization so everyone could setup their desired configuration.

Thanks!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Re: Formatting options

Postby SylwesterZ » December 31st, 2016, 8:47 pm

Thanks, it would be great to have similar customization options as C# language in VS. Now when copying and pasting, code is unformatted/source-formatted which needs too much manual fixing.
SylwesterZ
 
Posts: 2
Joined: December 18th, 2016, 1:57 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 60 guests

cron

User Control Panel

Login

Who is online

In total there are 60 users online :: 0 registered, 0 hidden and 60 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 60 guests