There were a few problems with the PHP indentation resetting to 0.
When you pressed return after typing <?php:
Removing *<Return> from indentkeys solved this. When you press
return now, the next line still gets indented, but the current line
doesn't get reindented anymore. I don't think you will need this
behavior very often so think it is safe to remove.
When there was a comment on the first line of a PHP block:
The indentation on the next line got reset when the first line of a
PHP block was a comment. Fixed this by skipping searchpair if the
line is a comment.
I added 0=}},0=!!} to indentkeys, which reindents the line when you
type }} or !!} at the beginning of a line (ignoring whitespace).
There were a few problems with the PHP indentation resetting to 0.
<?php
: Removing*<Return>
from indentkeys solved this. When you press return now, the next line still gets indented, but the current line doesn't get reindented anymore. I don't think you will need this behavior very often so think it is safe to remove.searchpair
if the line is a comment.I added
0=}},0=!!}
to indentkeys, which reindents the line when you type}}
or!!}
at the beginning of a line (ignoring whitespace).