aflott has asked for the wisdom of the Perl Monks concerning the following question:
Is there an option for controlling how arguments are aligned?
e.g. I have this:
blah("whatever"); blah("this", "that", "more of this", "and another option that makes th +e line super looooooooong");
and want this:
blah("whatever"); blah("this", "that", "more of this", "and another option that makes the line super looooooooong");
I'd like the arguments to be put on new lines when they either a) reach a specific line limit b) is greater than n. Ideally I could get this with data structures as well.
This is the perltidyrc I'm using:
--indent-columns=4 # Indent 4 spaces --check-syntax # perl -c file for a second opinion --maximum-line-length=200 # Maximum line length --continuation-indentation=2 # Continuatioin indentation --nooutdent-labels # No outdenting of labels --paren-tightness=2 # Parens tightness --square-bracket-tightness=1 # Square bracket tightness --paren-tightness=2 # Brace tightness --nospace-for-semicolon # No for semicolon --space-after-keyword=1 # Add space between keyword and openin +g paren --opening-brace-on-new-line # Opening brace always on new line --vertical-tightness=0 # Always break line after { --vertical-tightness-closing=0 # Always break line befor } --blanks-before-comments # Blank line before comments --blanks-before-subs # Blank line before subs
But when I omit the maximum line length, undesirable things like this happen:
blah( "some argument over 80 characters");
I definitely want lines longer than 80 characters.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using perltidy with function arguments
by zentara (Cardinal) on Aug 23, 2010 at 15:27 UTC | |
|
Re: Using perltidy with function arguments
by TomDLux (Vicar) on Aug 23, 2010 at 16:39 UTC |