Git commit 20bf6f9043b4195c4cd12a3a01835d597ef942b5 by Pablo Rauzy. Committed on 09/08/2022 at 15:34. Pushed by cullmann into branch 'master'.
renaming "Align" to "Format Indentation throughout the doc M +21 -2 doc/kate/menus.docbook M +1 -1 doc/katepart/configuring.docbook M +2 -2 doc/katepart/development.docbook M +1 -1 doc/katepart/part.docbook https://invent.kde.org/utilities/kate/commit/20bf6f9043b4195c4cd12a3a01835d597ef942b5 diff --git a/doc/kate/menus.docbook b/doc/kate/menus.docbook index 71a6fad48..ef279f9aa 100644 --- a/doc/kate/menus.docbook +++ b/doc/kate/menus.docbook @@ -1611,6 +1611,9 @@ depends on the <link linkend="pref-edit-indent"> indentation settings</link>.</p </listitem> </varlistentry> --> + +<!-- <Pablo> These are in the selection menu now, and are documented in doc/katepart/menus.docbook --> +<!-- <varlistentry id="tools-cleanindent"> <term><menuchoice> <guimenu>Tools</guimenu> @@ -1623,10 +1626,10 @@ all your selected text follows the indentation mode you choose.</para> </listitem> </varlistentry> -<varlistentry id="tools-align"> +<varlistentry id="tools-formatindent"> <term><menuchoice> <guimenu>Tools</guimenu> -<guimenuitem>Align</guimenuitem> +<guimenuitem>Format Indent</guimenuitem> </menuchoice></term> <listitem> <para>Causes a realign of the current line or selected lines using the @@ -1634,6 +1637,21 @@ indentation mode and indentation settings in the document.</para> </listitem> </varlistentry> +<varlistentry id="tools-alignon"> +<term><menuchoice> +<guimenu>Tools</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> +</listitem> +</varlistentry> + <varlistentry id="tools-comment"> <term><menuchoice> <shortcut> @@ -1722,6 +1740,7 @@ in the Editing tab in <menuchoice> <guimenu>Settings</guimenu><guimenuitem>Configure Editor...</guimenuitem></menuchoice>.</para></listitem> </varlistentry> +--> </variablelist> </sect1> diff --git a/doc/katepart/configuring.docbook b/doc/katepart/configuring.docbook index d31bbd741..5eab5d2e4 100644 --- a/doc/katepart/configuring.docbook +++ b/doc/katepart/configuring.docbook @@ -634,7 +634,7 @@ if the cursor is located in the leading blank space of a line.</para> <listitem> <para> If you want 	 to align the current line in the current code block -like in &Emacs;, make 	 a shortcut to the action <guimenuitem>Align</guimenuitem>. +like in &Emacs;, make 	 a shortcut to the action <guimenuitem>Format Indentation</guimenuitem>. </para> <variablelist> <varlistentry> diff --git a/doc/katepart/development.docbook b/doc/katepart/development.docbook index 575377111..cc1b561d6 100644 --- a/doc/katepart/development.docbook +++ b/doc/katepart/development.docbook @@ -2642,7 +2642,7 @@ triggerCharacters = "{}/:;"; function indent(line, indentWidth, ch) { // called for each newline (ch == '\n') and all characters specified in - // the global variable triggerCharacters. When calling <menuchoice><guimenu>Tools</guimenu><guimenuitem>Align</guimenuitem></menuchoice> + // the global variable triggerCharacters. When calling <menuchoice><guimenu>Tools</guimenu><guimenuitem>Format Indentation</guimenuitem></menuchoice> // the variable ch is empty, i.e. ch == ''. // // see also: Scripting API @@ -2654,7 +2654,7 @@ The function <function>indent()</function> has three parameters: <itemizedlist> <listitem><para><literal>line</literal>: the line that has to be indented</para></listitem> <listitem><para><literal>indentWidth</literal>: the indentation width in number of spaces</para></listitem> -<listitem><para><literal>ch</literal>: either a newline character (<literal>ch == '\n'</literal>), the trigger character specified in <literal>triggerCharacters</literal> or empty if the user invoked the action <menuchoice><guimenu>Tools</guimenu><guimenuitem>Align</guimenuitem></menuchoice>.</para></listitem> +<listitem><para><literal>ch</literal>: either a newline character (<literal>ch == '\n'</literal>), the trigger character specified in <literal>triggerCharacters</literal> or empty if the user invoked the action <menuchoice><guimenu>Tools</guimenu><guimenuitem>Format Indentation</guimenuitem></menuchoice>.</para></listitem> </itemizedlist> The return value of the <function>indent()</function> function specifies how the line will be indented. If the return value is a simple integer number, it diff --git a/doc/katepart/part.docbook b/doc/katepart/part.docbook index 49b7da878..a507e7613 100644 --- a/doc/katepart/part.docbook +++ b/doc/katepart/part.docbook @@ -533,7 +533,7 @@ the feature on a per document level. This will be fixed in a future version of & designed for different text formats. You can pick from the available modes using the <menuchoice><guimenu>Tools</guimenu><guisubmenu>Indentation</guisubmenu></menuchoice> menu. The autoindent modules also provide a function -<menuchoice><guimenu>Tools</guimenu><guimenuitem>Align</guimenuitem></menuchoice> +<menuchoice><guimenu>Tools</guimenu><guimenuitem>Format Indentation</guimenuitem></menuchoice> which will recalculate the indentation of the selected or current line. Thus, you may reindent your entire document by selecting all the text and activating that action.</para>
