<para>This command aligns lines in the selected block or whole document on the column given by a regular expression given as an argument.</para>
<para>If you give an empty pattern it will align on the first non-blank character by default.</para>
<para>If the pattern has a capture it will indent on the captured match.</para>
<para><emphasis>Examples:</emphasis></para>
<para><userinput>alignon -</userinput> will insert spaces before the first '-' of each lines to align them all on the same column.</para>
<para><userinput>alignon :\\s+(.)</userinput> will insert spaces before the first non-blank character that occurs after a colon to align them all on the same column.</para>
Indents all lines in <replaceable>range</replaceable> by <replaceable>change</replaceable> tabs or <replaceable>change</replaceable> times <literal>tabSize</literal> spaces depending on the users preferences. The <replaceable>change</replaceable> parameter can be negative.
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>
@@ -674,10 +674,10 @@ all your selected text follows the indentation mode you choose.</para>
</listitem>
</varlistentry>
<varlistentry id="selection-align">
<varlistentry id="selection-formatindent">
<term><menuchoice>
<guimenu>Selection</guimenu>
<guimenuitem>Align</guimenuitem>
<guimenuitem>Format Indent</guimenuitem>
</menuchoice></term>
<listitem>
<para>Causes a realign of the current line or selected lines using the
...
...
@@ -685,6 +685,21 @@ indentation mode and indentation settings in the document.</para>
</listitem>
</varlistentry>
<varlistentry id="selection-alignon">
<term><menuchoice>
<guimenu>Selection</guimenu>
<guimenuitem>Align On...</guimenuitem>
</menuchoice></term>
<listitem>
<para>This command aligns lines in the selected block or whole document on the column given by a regular expression that you will be prompted for.</para>
<para>If you give an empty pattern it will align on the first non-blank character by default.</para>
<para>If the pattern has a capture it will indent on the captured match.</para>
<para><emphasis>Examples:</emphasis></para>
<para>With '<userinput>-</userinput>' it will insert spaces before the first '-' of each lines to align them all on the same column.</para>
<para>With '<userinput>alignon :\\s+(.)</userinput>' it will insert spaces before the first non-blank character that occurs after a colon to align them all on the same column.</para>