Emacs & PHP indenting question
I'm a bit new to using emacs for webdevelopment. I am using php-mode and i am happy with it. There is only 开发者_如何学Goone issue i have which causes me a lot of problems because of our company's coding style.
When i have a function, e.g.:
$instance = new Model('foo', 'bar');
And I want to indent it like this:
$instance = new Model(
'foo',
'bar'
);
Emacs does the following when i insert a newline before the first argument and indents it like this:
$instance = new Model(
'foo',
'bar'
);
Can anyone point me in a direction on how i can configure/change this?
Thanks in advance
php-mode is actually build on top of cc-mode, so you can use cc-mode's indentation customization capabilities. Have a look here.
In you .emacs file of configuration add this line:
(setq standard-indent X)
Being X the amount of spaces you want to indent while hitting TAB.
精彩评论