3

As I guess, this is about the code formation for multi-line assignment such as this post has fully described.

...example
$server = 'localhost';
$port = 80;

the equal signs would be made to "line up", the second statement getting more whitespace padding in front of the equal sign than it would...

i.e. we want it to be

$server = 'localhost';    
$port   = 80;

But I guess it is not that way.

So my question is what is such option?

enter image description here

2
  • Update: this issue's status has been changed to RESOLVED FIXED. This means, assuming that the patch is accepted, that the fix should be integrated into the main branch in a few days (Nov 4, 2011)netbeans.org/bugzilla/show_bug.cgi?id=187734 Commented Nov 4, 2011 at 17:17
  • Cool! It said will be ready in 7.1 i.e. this December; a bit long though :D Commented Nov 5, 2011 at 16:17

1 Answer 1

2

Update: As of 20th of July 2018 this feature is working as expected. Once you save the settings as shown in question, you can use the 'auto format' feature ( Alt + Shift + F ) to align the code based on assignment operator.


You are correct in thinking that this option is for aligning multi-line assignments. However, it appears that this is an issue which has not yet been fixed.

I have voted for it and it would be advisable that you do the same. To vote on an issue, you'll need to register for an account and sign in. Once signed in, visit the issue and click on the vote link which is next to the priority section.

Sign up to request clarification or add additional context in comments.

2 Comments

FYI Here's a blog talking about the new feature blogs.oracle.com/netbeansphp/entry/…
Hi, it's a little later, i agree, but on Netbeans 8.x i cannot get this to work. It's checked in the options, but how to use it then? I select the line block, i click on Source - > format and nothing happen. Any idea?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.