Raimondi / delimitMate

Vim plugin, provides insert mode auto-completion for quotes, parens, brackets, etc.
http://www.vim.org/scripts/script.php?script_id=2754
1.98k stars 117 forks source link

Closing parenthesis and brackets do not indent correctly in PHP #188

Closed swekaj closed 9 years ago

swekaj commented 10 years ago

This issue is when using 2072/PHP-Indenting-for-VIm and delimitMate_expand_cr option is enabled.

If you type [<cr> or (<cr>, the expected behavior is:

$arr = array(
    |
)

where | is the cursor position. Instead, what happens is:

$arr = array(
    |
    )

Notice the closing ) is indented one level farther than it should be. The same behavior happens with [ ].

I initially opened 2072/PHP-Indenting-for-VIm#35, but he suggested the problem actually lies with delimitMate not properly triggering the indentexpr when the ) or ] is moved to the next line.

blueyed commented 10 years ago

This looks like https://github.com/Raimondi/delimitMate/pull/180 might fix this. Can you test and confirm it?