]> git.donarmstrong.com Git - perltidy.git/commitdiff
updated docs for -ihb -isb -ip
authorSteve Hancock <perltidy@users.sourceforge.net>
Fri, 18 Sep 2020 14:32:37 +0000 (07:32 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Fri, 18 Sep 2020 14:32:37 +0000 (07:32 -0700)
bin/perltidy
docs/perltidy.html

index ae5861641ca97050ff2089807b7bd82c3ba9cd7e..a0e34d29380b679775e154e0cb31137b22d0b357 100755 (executable)
@@ -2179,10 +2179,45 @@ this parameter has no effect.
 
 =item *
 
-Similar flags for controlling parens and square brackets are given in the next section.
+The indentation of the braces will normally be one level of continuation
+indentation by default.  This can be changed with the parameter
+B<--indent-hash-brace=n> in the next section.
+
+=item *
+
+Similar flags for controlling parens and square brackets are given in the subsequent section.
 
 =back   
 
+=item B<-ihb=n>,  B<--indent-hash-brace=n>
+
+This flag is a companion to B<-bbhb> for controlling the indentation of an opening hash brace.
+The indentation is as follows:
+
+  -ihb=0 one continuation level [default]
+  -ihb=1 outdent by one continuation level
+  -ihb=2 indent one full indentation level
+
+For example:
+
+    # perltidy -bbhb=3 -ihb=1
+    $romanNumerals =
+    {
+        one   => 'I',
+        two   => 'II',
+        three => 'III',
+        four  => 'IV',
+    };
+
+    # perltidy -bbhb=3 -ihb=2
+    $romanNumerals =
+        {
+        one   => 'I',
+        two   => 'II',
+        three => 'III',
+        four  => 'IV',
+        };
+
 =item B<-bbsb=n>,  B<--break-before-square-bracket=n>
 
 This flag is similar to the flag described above, except it applies to square brackets.
@@ -2192,6 +2227,15 @@ This flag is similar to the flag described above, except it applies to square br
   -bbsb=2 break if list is 'complex', meaning it contains other broken lists
   -bbsb=3 always break
 
+=item B<-isb=n>,  B<--indent-square-bracket=n>
+
+This flag is a companion to B<-bbsb> for controlling the indentation of an opening square bracket.
+The indentation is as follows:
+
+  -isb=0 one continuation level [default]
+  -isb=1 outdent by one continuation level
+  -isb=2 indent one full indentation level
+
 =item B<-bbp=n>,  B<--break-before-paren=n>
 
 This flag is similar to B<-bbhb=n>, described above, except it applies to parens.
@@ -2201,6 +2245,15 @@ This flag is similar to B<-bbhb=n>, described above, except it applies to parens
   -bbp=2 break if list is 'complex', meaning it contains other broken lists
   -bbp=3 always break
 
+=item B<-ip=n>,  B<--indent-paren=n>
+
+This flag is a companion to B<-bbp> for controlling the indentation of an opening paren.
+The indentation is as follows:
+
+  -ip=0 one continuation level [default]
+  -ip=1 outdent by one continuation level
+  -ip=2 indent one full indentation level
+
 
 =item B<-wn>,  B<--weld-nested-containers> 
 
index 91e3243d8ec6553a5ce0ec4d60ef473a0168279f..806eba17746bfe5a91f671605e0f1c57a00c5c95 100644 (file)
 <li><p>If multiple opening tokens have been &#39;welded&#39; together with the <b>-wn</b> parameter, then this parameter has no effect.</p>
 
 </li>
-<li><p>Similar flags for controlling parens and square brackets are given in the next section.</p>
+<li><p>The indentation of the braces will normally be one level of continuation indentation by default. This can be changed with the parameter <b>--indent-hash-brace=n</b> in the next section.</p>
+
+</li>
+<li><p>Similar flags for controlling parens and square brackets are given in the subsequent section.</p>
 
 </li>
 </ul>
 
+</dd>
+<dt id="ihb-n---indent-hash-brace-n"><b>-ihb=n</b>, <b>--indent-hash-brace=n</b></dt>
+<dd>
+
+<p>This flag is a companion to <b>-bbhb</b> for controlling the indentation of an opening hash brace. The indentation is as follows:</p>
+
+<pre><code>  -ihb=0 one continuation level [default]
+  -ihb=1 outdent by one continuation level
+  -ihb=2 indent one full indentation level</code></pre>
+
+<p>For example:</p>
+
+<pre><code>    # perltidy -bbhb=3 -ihb=1
+    $romanNumerals =
+    {
+        one   =&gt; &#39;I&#39;,
+        two   =&gt; &#39;II&#39;,
+        three =&gt; &#39;III&#39;,
+        four  =&gt; &#39;IV&#39;,
+    };
+
+    # perltidy -bbhb=3 -ihb=2
+    $romanNumerals =
+        {
+        one   =&gt; &#39;I&#39;,
+        two   =&gt; &#39;II&#39;,
+        three =&gt; &#39;III&#39;,
+        four  =&gt; &#39;IV&#39;,
+        };</code></pre>
+
 </dd>
 <dt id="bbsb-n---break-before-square-bracket-n"><b>-bbsb=n</b>, <b>--break-before-square-bracket=n</b></dt>
 <dd>
   -bbsb=2 break if list is &#39;complex&#39;, meaning it contains other broken lists
   -bbsb=3 always break</code></pre>
 
+</dd>
+<dt id="isb-n---indent-square-bracket-n"><b>-isb=n</b>, <b>--indent-square-bracket=n</b></dt>
+<dd>
+
+<p>This flag is a companion to <b>-bbsb</b> for controlling the indentation of an opening square bracket. The indentation is as follows:</p>
+
+<pre><code>  -isb=0 one continuation level [default]
+  -isb=1 outdent by one continuation level
+  -isb=2 indent one full indentation level</code></pre>
+
 </dd>
 <dt id="bbp-n---break-before-paren-n"><b>-bbp=n</b>, <b>--break-before-paren=n</b></dt>
 <dd>
   -bbp=2 break if list is &#39;complex&#39;, meaning it contains other broken lists
   -bbp=3 always break</code></pre>
 
+</dd>
+<dt id="ip-n---indent-paren-n"><b>-ip=n</b>, <b>--indent-paren=n</b></dt>
+<dd>
+
+<p>This flag is a companion to <b>-bbp</b> for controlling the indentation of an opening paren. The indentation is as follows:</p>
+
+<pre><code>  -ip=0 one continuation level [default]
+  -ip=1 outdent by one continuation level
+  -ip=2 indent one full indentation level</code></pre>
+
 </dd>
 <dt id="wn---weld-nested-containers"><b>-wn</b>, <b>--weld-nested-containers</b></dt>
 <dd>