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

variable assignment spanning multiple lines #84

Open jnorell opened 2 years ago

jnorell commented 2 years ago

Hello,

Indenting is missed on multi-line variable assignment, eg. for something like this I would expect the second and third line to indent:

$sql = "select something "
. "from somewhere "
. "where conditions=match";

Is there a way to configure that to happen?

Thanks...

2072 commented 2 years ago

Hi,

It's something that happens only when the declaration is at col 0 and it's the first statement in the file:

<?php

$sql = "select something "
. "from somewhere "
. "where conditions=match";

$sql = "select something "
    . "from somewhere "
    . "where conditions=match";