[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pdt-dev] indentation question (new to eclipse and PDT)

Hello all,

I'd like to start using Eclipse for my PHP development work, but the way the code gets formatted really baffles me. Even so much that I'm sure something is wrong in my setup.

e.g the code:

$my_array = array( 'key1' => 'val1', 'key2'=>'val2');

I would expect that after pressing <enter> after the comma behind 'val1', the pointer will bring me to the following line, right under 'key1' so that every line for this array definition is aligned between the (

I agree that a lot depends on the code style you want to use, but currently the code results in no indentation whatsoever (at least within the array).:
$my_array = array( 'key1' =>'val1',
'key2'=>'val2'
)

As long as I have to enter all spaces myself to get some readable indentation, I won't be able to enjoy all the other great features this IDE gives. The formatting/readability is for me a starting point.

I hope I missed something, but I couldn't find useful hints. There is some indentation between {}, so auto-indenting is on.

Hopefully someone out there can give some hints.

Thanks a lot.

Pieter