styles - Long Argument Indentation in emacs -
i using "bsd" style indentation in emacs. prefer limit myself 80 character lines.
there situations passing many arguments function , exceed 80 characters. when happen, insert newline. currently, if use automated indentation continuation of line, following:
function __timeblock($inputday, $inputstarthour, $inputstartminute, $inputendhour, $inputendminute)
however, want is:
function __timeblock($inputday, $inputstarthour, $inputstartminute, $inputendhour, $inputendminute)
it should line directly below first character after paren above.
is there way edit indentations automatically behavior when have newline within set of parens "()"?
i apply across whitespace-ignoring languages code in within emacs.
this start you:
(add-hook 'c-mode-hook 'my-c-mode-hook) (defun my-c-mode-hook () "customisations c-mode , derivatives." (c-set-style "bsd"))
n.b. php modes i've seen derive c-mode.
or if prefer:
m-x customize-variable
ret c-default-style
ret
and specify bsd
appropriate.
fwiw, specific syntactic context element symbol (for c-offsets-alist
) question appears be:
arglist-cont-nonempty -- subsequent argument list lines when @ least 1 argument follows on same line arglist opening paren.
(but doesn't you'll need override value.)
Comments
Post a Comment