Skip to content

array indent is not good #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bugcook opened this issue May 28, 2012 · 4 comments
Closed

array indent is not good #14

bugcook opened this issue May 28, 2012 · 4 comments
Assignees

Comments

@bugcook
Copy link

bugcook commented May 28, 2012

it's too long, maybe it's my problem.
http://emacswiki.org/emacs/PhpMode#toc16
Some one solve this in emacs wiki.

@alanpearce
Copy link
Contributor

Could you show an example of how it looks when you try to indent it with Emacs, and what you think it should look like?

@bugcook
Copy link
Author

bugcook commented May 29, 2012

With my Emacs,

$post=Post::model()->find(array(
                              'select'=>'title',
                              'condition'=>'postID=:postID',
                              'params'=>array(':postID'=>10),
                              ));

And i think it might be more good looking to:

$post=Post::model()->find(array(
    'select'=>'title',
    'condition'=>'postID=:postID',
    'params'=>array(':postID'=>10),
));

@ejmr
Copy link
Collaborator

ejmr commented May 29, 2012

I have nothing against adding a change like this so I'll try out the code on Emacs Wiki and see how it affects things in general. In your example I agree the second block of code is more readable, so I think it would be preferable to support that.

@ghost ghost assigned ejmr May 29, 2012
@ejmr
Copy link
Collaborator

ejmr commented May 30, 2012

I have pushed a patch to modify indentation so it works this way. Thanks eorza for the suggestion. I like this change better.

@ejmr ejmr closed this as completed May 30, 2012
haxney added a commit to haxney/php-mode that referenced this issue Feb 8, 2013
ejmr pushed a commit that referenced this issue Feb 8, 2013
This massively cuts back on the elisp code needed.

Signed-off-by: Eric James Michael Ritz <[email protected]>
ejmr pushed a commit that referenced this issue Feb 8, 2013
* haxney/tests-with-magic-comments:
  Use magic for tests of issues #14, #19, #27, #29, #42
  Use "magic" comments in PHP files to simplify indentation testing
ejmr added a commit that referenced this issue Jun 22, 2017
This patch adds a few small tweaks to the "How to Contribute" section
of the README:

1. Do not make linking contributors names to websites sound
mandatory.

2. Add a `#` character before the numbers in `GitHub-Issue` commit
message metadata, e.g. `GitHub-Issue: #14`.

3. Replace the "I will..." of bumping the version number to reflect
the fact PHP Mode currently has two equal maintainers, who both are
free to increase the version number as they deem fit.

Signed-off-by: Eric James Michael Ritz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants