Commit ec1e2cd2 authored by Pablo Rauzy's avatar Pablo Rauzy
Browse files

moved document.alignOn to view.alignOn in frameworks/ktexteditor!391,...

moved document.alignOn to view.alignOn in frameworks/ktexteditor!391, reflecting this in the documentation
parent 10fa1492
......@@ -3534,6 +3534,21 @@ Properly re-indent lines within <replaceable>range</replaceable> according to cu
</listitem>
</varlistentry>
<varlistentry>
<term><synopsis>
void view.alignOn(<parameter>Range <replaceable>range</replaceable></parameter>, <parameter>String <replaceable>pattern</replaceable> = &quot;&quot;</parameter>);
</synopsis></term>
<listitem><para>
Aligns lines in <replaceable>range</replaceable> on the column given by the regular expression <replaceable>pattern</replaceable>.
With an empty <replaceable>pattern</replaceable> it will align on the first non-blank character by default.
If the pattern has a capture it will indent on the captured match.
</para>
<para><emphasis>Examples:</emphasis></para>
<para><literal>view.alignOn(document.documentRange(), '-');</literal> will insert spaces before the first <literal>-</literal> of each lines to align them all on the same column.</para>
<para><literal>view.alignOn(document.documentRange(), ':\\s+(.)');</literal> will insert spaces before the first non-blank character that occurs after a colon to align them all on the same column.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><synopsis>
object view.executeCommand(<parameter>String <replaceable>command</replaceable></parameter>,
......@@ -4416,21 +4431,6 @@ Indents all lines in <replaceable>range</replaceable> by <replaceable>change</re
</para></listitem>
</varlistentry>
<varlistentry>
<term><synopsis>
void document.alignOn(<parameter>Range <replaceable>range</replaceable></parameter>, <parameter>String <replaceable>pattern</replaceable> = &quot;&quot;</parameter>);
</synopsis></term>
<listitem><para>
Aligns lines in <replaceable>range</replaceable> on the column given by the regular expression <replaceable>pattern</replaceable>.
With an empty <replaceable>pattern</replaceable> it will align on the first non-blank character by default.
If the pattern has a capture it will indent on the captured match.
</para>
<para><emphasis>Examples:</emphasis></para>
<para><literal>document.alignOn(document.documentRange(), '-');</literal> will insert spaces before the first <literal>-</literal> of each lines to align them all on the same column.</para>
<para><literal>document.alignOn(document.documentRange(), ':\\s+(.)');</literal> will insert spaces before the first non-blank character that occurs after a colon to align them all on the same column.</para>
</listitem>
</varlistentry>
</variablelist>
</para>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment