2072 / PHP-Indenting-for-VIm

The official VIm indent script for PHP
http://www.2072productions.com/to/phpindent.txt
128 stars 29 forks source link

Array indentation gets broken #58

Closed chitoku-k closed 7 years ago

chitoku-k commented 7 years ago

I encountered a buggy behavior in array indentation that can be reproducible in following steps:

  1. Run Vim without .vimrc: vim -u NORC
  2. let g:PHP_vintage_case_default_indent = 1
  3. set ft=php
  4. Input some code which contains array(s):
<?php
$x = [
];
$y = array(
);

after hitting return, the indentation becomes like this:

<?php
$x = [
    ];
$y = array(
    );

This does not happen when g:PHP_vintage_case_default_indent is disabled (default).

Environment: Vim version 8.0.946

Thank you.

2072 commented 7 years ago

This should be fixed now.

chitoku-k commented 7 years ago

Yes it is! Thanks.