Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » PHP Formatter - Array Ending Bracket Indentation
PHP Formatter - Array Ending Bracket Indentation [message #1439972] Tue, 07 October 2014 19:20 Go to next message
Marcus Schwab is currently offline Marcus SchwabFriend
Messages: 1
Registered: October 2014
Junior Member
Hello,

I can't figure out how to make PHP not indent the ending bracket of an array further than the starting one.

I've attached a screen shot of where it is, and where I want it.

Any ideas?

index.php/fa/19412/0/
Re: PHP Formatter - Array Ending Bracket Indentation [message #1446342 is a reply to message #1439972] Thu, 16 October 2014 18:07 Go to previous message
Vicente Bissoli is currently offline Vicente BissoliFriend
Messages: 1
Registered: October 2014
Junior Member
I think Eclipse array indentation policy should be more flexible, keeping user style (like Netbeans). What i mean is that sometimes, i want to indent short arrays like
$arr = [1 => 'a', 2 => 'b', 3 => 'c', 4 => 'd'];

and sometimes, long arrays, like
$arr = [
    1 => 'a',
    2 => 'b',
    3 => 'c',
    4 => 'd'
];

but Eclipse allows just one or other. Am i correct or am i missing something?

Edit:
I know there's a workaround using
@formatter:off
and
@formatter:on
but would be perfect and option like 'never join already wrapper lines'.

[Updated on: Tue, 02 December 2014 13:38]

Report message to a moderator

Previous Topic:PDT Mylyn Integration (v3.2) install error
Next Topic:Debugging a script with many files using the last version of Eclipse
Goto Forum:
  


Current Time: Sun Oct 13 20:12:55 GMT 2024

Powered by FUDForum. Page generated in 0.05173 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top