<chapter id="plugins">

<chapterinfo>
<authorgroup>
<author>&Anders.Lund; &Anders.Lund.mail;</author>
<!-- TRANS:ROLES_OF_TRANSLATORS -->
</authorgroup>
</chapterinfo>

<title>Working with Plugins</title>

<para>Kate is using two different forms of plugins, namely plugins for the
&kate; application and plugins for the &kate; editor component. The latter are
available to any application using the editor component, such as KDevelop,
Quanta, Kile, Kwrite and many others, while application plugins are specific
to the &kate; application.</para>

<para>You can enable both types of plugins in the <link
linkend="configuring-kate-configdialog">configuration dialog</link>, which also
provides access to additional configuration options for plugins that requires
that.</para>

<para>There are many plugins for various purposes available
and you can search the web for more. A few plugins are shipped with the
editor component, for inserting automatic braces, insert files,
data tools and exporting text as &HTML;.</para>

<sect1 id="kate-editor-plugins">
<title>Editor Component Plugins</title>

<para>The <guilabel>Plugins</guilabel> tab on the <guilabel>Extensions</guilabel> page
lists all available plugins and you can check those you
want to use. Click on the <guibutton>Information</guibutton> button to open the
<guilabel>About</guilabel> dialog of this plugin.</para>
<para>Once a configurable plugin is checked, the
<guibutton>Configure</guibutton> button is enabled and you can click it
in order to configure the highlighted plugin.</para>

<variablelist>
<varlistentry>
<term><guilabel>AutoBrace</guilabel></term>
<listitem><para>The autobrace plugin supersedes the &kate; internal 
<quote>Auto Brackets</quote> feature. 
It automatically inserts a closing brace <keycap>}</keycap> at the beginning 
of the next line after ending a line with an opening one <keycap>{</keycap>
and pressing the &Enter; key.</para></listitem>
</varlistentry>
<!--http://jakob.petsovits.at/topic/kate-->
<!--Right, it's the automatic insertion of a closing brace ("}") after you ended a line with an opening one ("{"). Kate's standard insertion of parentheses, brackets and braces is simply too obtrusive for me, so even if I tried it several times I always had to disable it again because I can't stand it. So here's how AutoBrace works.
You, the developer, are writing a line of code, and want to open a new block delimited by braces. Looks like this:
If you press Enter and AutoBrace is enabled, it will insert your favorite new brace where it belongs. Looks like this:
-->
<varlistentry>
<term><guilabel>Data Tools</guilabel></term>
<listitem><para>Enables data tools like thesaurus and spell check (if installed). 
Data tools are only available when text is selected, or when the right mouse 
button is clicked over a word. If no data tools are offered even when text 
is selected, you need to install them. Some data tools are part of the 
&koffice; package.
If this plugin is enabled and data tools are installed, additional items 
appear at the end of the context menu.</para></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="kate-editor-plugin-exporter"><guilabel>Exporter</guilabel></link></term>
<listitem><para>This command allows you to export the current document with all highlighting 
information into a HTML document using <menuchoice><guimenu>File</guimenu><guimenuitem>Export 
as HTML</guimenuitem></menuchoice>. Additionally you can use <menuchoice><guimenu>Edit</guimenu>
<guimenuitem>Copy as HTML</guimenuitem></menuchoice> to copy the currently selected text 
as HTML to the system clipboard.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>IconInserter</guilabel></term>
<listitem><para>The icon inserter plugin is only of use for &kde; developers: It adds an item 
<guimenuitem>Insert KIcon-Code</guimenuitem> into the context menu of the editor. 
If activated, the &kde;'s icon chooser opens (showing application icons, action icons &etc;..). 
If you click on it, the file name without file extension will be inserted as 
text. Useful only for setting icons via &kde;'s framework through the KIcon() class.
</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Insane (not ZEN) HTML coding (light edition)</guilabel></term>
<listitem><para>A plugin, which does zen-coding like selector completion.
For more information see <ulink url="http://en.wikipedia.org/wiki/Zen_Coding">
Zen Coding</ulink>.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Insert File</guilabel></term>
<listitem><para>This plugin allows you to insert any readable file at the cursor position. 
If enabled, the <guimenu>Tools</guimenu> menu has an additional menu item 
<guimenuitem>Insert File</guimenuitem>.</para></listitem>
</varlistentry>
<!-- not build any longer in kde 4.5
<varlistentry>
<term>Python Encoding check</term>
<listitem><para>This plugin is always enabled.  
If you are trying to save a python file as non ASCII, without specifying a 
correct source encoding line like &eg; <quote># -*- coding: utf-8 -*-</quote>, 
a warning dialog pops up and allows you to add a proper source encoding line for the
current encoding to the file.
</para></listitem>
</varlistentry>
-->
</variablelist>
<!--
kdelibs/kate/plugins/ has additional plugins
autobookmark not build, its broken!
timedate not build? plugin is for howto-write-a-plugin purposes!
-->

<!-- Scripts tab ??? empty: Not implemented yet, hidden in 4.4 + 4.7  branch, removed in master bye bye-->
</sect1>

<sect1 id="kate-application-plugins">
<title>&kate; Application Plugins</title>

<!-- from doc/kate-addons/index.docbook -->
<para>
&kate; plugins are additional functions for the &kate; editor.  They can
add extra menus and shortcuts, and extend &kate;'s features.  You can
install as many or as few as you like, from within &kate;. 
Open &kate;'s configuration dialog with 
<menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure &kate;...</guimenuitem></menuchoice>
Select <menuchoice><guimenu>Application</guimenu><guimenuitem>Plugins</guimenuitem></menuchoice> to
choose the wanted plugins.
</para>

<para>
The available application plugins are:
</para>
<itemizedlist>
<listitem>
<para><link linkend="kate-application-plugin-findinfiles">Find in files tool view</link> - 
  Toolview allowing to search in all open files or files in the filesystem</para>
</listitem>
<listitem>
<para>GDB - Provides a simple GDB frontend</para>
<!-- GDB Plugin http://kate-editor.org/2011/06/23/kate-plugin-updates-part-2/-->
</listitem>
<listitem>
<para>Backtrace Browser - Backtrace navigation tool view</para>
</listitem>
<listitem>
<para><link linkend="kate-application-plugin-quickswitcher">Quick Document switcher</link> - 
  Quickly switch to another already opened document</para>
</listitem>
<listitem>
<para>SQL Plugin - Execute query on SQL databases</para>
</listitem>
<listitem>
<para>Search Plugin - Find a pattern in files</para>
</listitem>
<listitem>
<para>Tab Bar - Adds a standard tab bar to &kate;'s main window</para>
<!--http://kate-editor.org/2011/04/25/kates-tab-bar-plugins/-->
</listitem>
<!--listitem>
<para>Text Snippets - Configurable Text Snippets</para>
</listitem-->
<listitem>
<para>Text Filter - Easy text filtering</para>
</listitem>
<listitem>
<para>Symbol Viewer - Extract and show reference symbols from source</para>
</listitem>
<listitem>
<para><link linkend="kate-application-plugin-fsbrowser">File system browser</link> - 
  File system browser tool view</para>
</listitem>
<listitem>
<para>Terminal tool view - Toolview embedding a terminal widget</para>
</listitem>
<!--listitem>
<para>Kate Python Browser Plugin - A Python browser plugin for Kate</para>
</listitem-->
<listitem>
<para>CTags Plugin - Look up definitions/declarations with CTags</para>
</listitem>
<listitem>
<para><link linkend="kate-application-plugin-filetemplate">File Templates</link> - 
  Create new files from templates</para>
</listitem>
<listitem>
<para>Open Header - Opens the corresponding .h/[.cpp|.c] file</para>
</listitem>
<listitem>
<para><link linkend="kate-application-plugin-exttools">External Tools</link></para>
</listitem>
<listitem>
<para>Build Plugin - Compile or Make and parse error messages</para>
<!-- http://kate-editor.org/2011/06/21/kate-plugin-updates-part-1/ -->
</listitem>
<listitem>
<para><link linkend="kate-application-plugin-mail">Mail files</link> - Send files
  via email</para>
</listitem>
<listitem>
<para>Multiline Tab Bar - Add a tab bar with multiple rows to &kate;'s main window</para>
</listitem>
<listitem>
<para>Kate Snippets - Snippets plugin with code completion support</para>
</listitem>
<listitem>
<para>Jovie Text-to-Speech Plugin - Adds a menu entry for speaking the text</para>
</listitem>
<listitem>
<para><link linkend="kate-application-plugin-xmlcheck">&XML; Validation</link>- Validates &XML; files using xmllint</para>
</listitem>
<listitem>
<para><link linkend="kate-application-plugin-xmltools">&XML;Completetion</link> - Lists &XML; elements, 
attributes, attribute values and entities allowed by DTD</para>
</listitem>
<listitem>
<para>Tabify - Adds a tab bar to Kate's main window</para>
<!--http://kate-editor.org/2011/04/25/kates-tab-bar-plugins/-->
</listitem>
</itemizedlist>
</sect1>

<!-- from doc/kate-addons/filetemplates.docbook -->
<sect1 id="kate-application-plugin-filetemplate">
<sect1info>
<authorgroup>
<author>&Anders.Lund; &Anders.Lund.mail;</author>
</authorgroup>
</sect1info>
<title>File Templates</title>

  <para>The File Templates plugin allows you to create files based on other
    files.</para>
  <para>When you first install Kate, you need to enable the plugin:</para>
  <orderedlist>
        <listitem>
          <para>
            Click <menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure Kate</guimenuitem></menuchoice>
          </para>
        </listitem>
        <listitem>
          <para>
            In the tree on the left of the screen, click <guilabel>Plugins</guilabel>.
          </para>
        </listitem>
        <listitem>
          <para>
            In the <guilabel>Plugin Manager</guilabel> panel on the right, select <guilabel>File Templates</guilabel>, and then click <guibutton>OK</guibutton>.
          </para>
        </listitem>
   </orderedlist>
  <para>You can now use any file as a template (this creates a copy of the
    file with an empty &URL;.) Special template files can contain
    macros to fill in information such as your name, email address, the
    current date, and position the cursor at a
    convenient position in the new file.</para>
  <para>You can easily create a new template from an open document.</para>
  <para>Templates that you save to the template folder are
    listed under  the menu item <menuchoice><guimenu>File</guimenu><guimenuitem>New from
    Template</guimenuitem></menuchoice>.</para>
  <para>The template folder is part of the &kde; file system, and
    consists of at least</para>
    <itemizedlist>
      <listitem>
	<para>
	 <filename role="directory">$<envar>KDEDIR</envar>/share/applications/kate/plugins/katefiletemplates/templates</filename>
	</para>
      </listitem>
      <listitem>
       <para>
        <filename role="directory">$<envar>KDEHOME</envar>/share/applications/kate/plugins/katefiletemplates/templates.</filename>
	</para>
      </listitem>
    </itemizedlist>
    <para>If your <envar>KDEDIRS</envar> environment variable contains additional directories, those are
    searched for a similar subdirectory as well. If equally named templates are
    found, the one in the local (KDEHOME) folder is chosen.</para>
  <sect2 id="katefiletemplates-menu">
    <title>Menu Structure</title>

    <variablelist>
      <varlistentry>
        <term>
          <menuchoice>
            <guimenu>File</guimenu>
            <guisubmenu>New From Template</guisubmenu>
            <guimenuitem>Any File...</guimenuitem>
          </menuchoice>
        </term>
        <listitem><para>Presents you with Open File dialog that allows
            you to use any file as a template. If the chosen file has the
            extension <filename>katetemplate</filename> it will be parsed
            for template information and macros.</para></listitem>
      </varlistentry>
      <!-- not in 4.4
      <varlistentry>
        <term>
          <menuchoice>
            <guimenu>File</guimenu>
            <guisubmenu>New From Template</guisubmenu>
            <guimenuitem>Use Recent</guimenuitem>
          </menuchoice>
        </term>
        <listitem><para>Presents a list of files recently used as
            templates, represented by their &URL;.</para></listitem>
      </varlistentry>
      -->
      <varlistentry>
        <term>
          <menuchoice>
            <guimenu>File</guimenu>
            <guimenuitem>New From Template</guimenuitem>
          </menuchoice>
        </term>
        <listitem><para>The remainder of submenus contains links to
            templates. Click a menuitem to create a file as described by
            the menu item text.</para></listitem>
      </varlistentry>

      <!-- Settings menu -->

      <varlistentry>
        <term>
          <menuchoice><guimenu>Settings</guimenu><guimenuitem>Manage
              Templates...</guimenuitem></menuchoice></term>
        <listitem><para>This will launch a dialog with a list of all templates
            found within the template directories, along with options to add,
            edit or remove templates.</para></listitem>
      </varlistentry>
    </variablelist>
  </sect2>

  <sect2 id="katefiletemplates-use">
    <title>Using a &kate; Template</title>
    <para>When creating a file from a template that contain template
      macros, some macros appears as editable variables in the text. Such
      variables appears as underlined words in the text.</para>
    <para>The first variable will be selected, so you just have to type to edit
      it. If the document text contains more instances of the same variable,
      they are changed as you edit. To move to the next editable variable,
      press the TAB key. When the last variable is edited, the list is
      dropped, and your TAB key works as normal.</para>
  </sect2>

  <sect2 id="katefiletemplates-create">
    <title>Creating your own templates</title>
    <para>To create a new template, use the
      <menuchoice><guimenu>Settings</guimenu>
        <guimenuitem>Manage Templates</guimenuitem></menuchoice> Item to launch
      the template management dialog. In that, click
      <guibutton>New...</guibutton> to launch the File Template Wizard. You
      will be asked for an optional file to turn into a template and prompted
      for template information settings, and a template file will be created for
      you.</para> <para>Alternatively, you can create a template manually by
      adding template information to the top of any file, add text and macros,
      and save it with the <filename>katetemplate</filename> extension.</para>
    <para>The template menu gets automatically updated if you chose to store
      your template in the template directory.</para>
  </sect2>

  <sect2 id="katefiletemplates-edit">
    <title>Editing templates</title>
    <para>To edit a template, use the
      <menuchoice><guimenu>Settings</guimenu>
        <guimenuitem>Manage Templates...</guimenuitem></menuchoice>. Select the
      template you want to work on and click <guibutton>Edit...</guibutton>,
      and the template file will be opened. Close the dialog, edit the template
      file as desired, save it and close it. Changes to templates takes
      immediate effect, you can activate the template to test your changes after
      saving it.</para>
  </sect2>

  <sect2 id="katefiletemplates-format">
    <title>The &kate; Template Format</title>
    <para>If you use files with the extension
      <filename>katetemplate</filename>, they will be parsed for template
      information, macros and a cursor position.</para>

    <sect3 id="katefiletemplates-template-info">
      <title>Template information</title>
      <para>While reading in the file, the parser keeps
        lines beginning with the phrase
        <constant>katetemplate:</constant> and searches them for
        template information in the form VARIABLENAME=VALUE. The first line not
        starting with <constant>katetemplate:</constant> will be taken as the
        start of the template contents. VALUE may contain any character but
        equal sign (=). Legal variable names are:
        <variablelist>
          <varlistentry>
            <term><varname>Template</varname></term>
            <listitem><para>This is the template name, displayed in the
                <menuchoice><guimenu>File</guimenu><guimenuitem>New from
                Template</guimenuitem></menuchoice> menu.</para></listitem>
          </varlistentry>
          <varlistentry>
            <term><varname>Group</varname></term>
            <listitem><para>The group places the template in a submenu of
                the <menuchoice><guimenu>File</guimenu><guimenuitem>New from
                    Template</guimenuitem></menuchoice> menu.</para></listitem>
          </varlistentry>
          <varlistentry><term><varname>Name</varname></term>
            <listitem><para>This is the name that will be set for the
                document, and displayed in the file list and title bar. If the
                name contains <userinput>%N</userinput> that will be replaced
                with a number, increasing if more documents has the same
                name.</para></listitem>
          </varlistentry>
          <varlistentry>
            <term><varname>Highlight</varname></term>
            <listitem><para>The plug-in will try to set the Highlight for
                the new document to the value of this variable. The value
                should be the name, as found in the
                <menuchoice><guimenu>Tools</guimenu>
                  <guimenuitem>Highlighting</guimenuitem>
                </menuchoice>.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term><varname>Description</varname></term>
            <listitem><para>A short informative description of the
                template. This is currently used to set a Whatsthis string for
                the menu item, but may be used for more purposes in the
                future.</para></listitem>
          </varlistentry>
          <varlistentry><term>Author</term>
            <listitem><para>A string identifying the author, for example
                in the form <userinput>Name &lt;email address&gt;</userinput>.
                This is currently used to set a Whatsthis string for the menu
                item, but may be used for more purposes in the
                future.</para></listitem>
          </varlistentry>
        </variablelist>
      </para>

    </sect3>

    <sect3 id="katetemplates-macros">
      <title>Template Macros</title>

      <para>While parsing the template contents, macros in the form
        <userinput>%{NAME}</userinput> or <userinput>${NAME}</userinput> are
        expanded. If you use the <userinput>$</userinput> prefix, the
        expanded macro will be treated as a editable variable when a document
        is created from the template, whereas if you use
        <userinput>%</userinput> it is not, unless expanding failed.</para>
      <para>The following macros are expanded:
        <variablelist>
          <varlistentry><term><literal>time</literal></term>
            <listitem><para>Expands to the current time in your locale
                format.</para></listitem>
          </varlistentry>
          <varlistentry>
            <term><literal>date</literal></term>
            <listitem><para>Expands to the current date in short
                format.</para></listitem>
          </varlistentry>
          <varlistentry>
            <term><literal>datetime</literal></term>
            <listitem><para>Expands to the current date and time,
                formatted as a string according to your
                locale.</para></listitem>
          </varlistentry>
          <varlistentry>
            <term><literal>year</literal></term>
            <listitem><para>The current year as a four digit
                number.</para></listitem>
          </varlistentry>
          <varlistentry>
            <term><literal>month</literal></term>
            <listitem><para>The full name of the current month, according
                to your locale.</para></listitem>
          </varlistentry>
          <varlistentry><term><literal>day</literal></term>
            <listitem><para>Expands to the current day of the month.</para>
            </listitem>
          </varlistentry>
          <varlistentry><term><literal>hostname</literal></term>
            <listitem><para>Expands to the 'hostname' of your computer.</para>
            </listitem>
          </varlistentry>
          <varlistentry><term><literal>index</literal></term>
            <listitem><para>Expands to 'i'.</para></listitem>
          </varlistentry>
          <varlistentry><term><literal>fullname</literal></term>
            <listitem><para>Expands to your full name, as defined by the
                owner addressee in your standard &kde;
                addressbook.</para></listitem>
          </varlistentry>
          <varlistentry><term><literal>firstname</literal></term>
            <listitem><para>Expands to your first name, as defined in the owner
                addressee in your standard &kde; addressbook.</para>
            </listitem>
          </varlistentry>
          <varlistentry><term><literal>lastname</literal></term>
            <listitem><para>Expands to your last name, as defined in the owner
                addressee in your standard &kde; addressbook.</para>
            </listitem>
          </varlistentry>
          <!-- <varlistentry>
            <term>username</term>
            <listitem><para>Expands to your username.</para></listitem>
          </varlistentry> -->
          <varlistentry>
            <term>email</term>
            <listitem><para>Expands to your email address, as defined by
                the owner address in your standard &kde;
                addressbook.</para></listitem>
          </varlistentry>
          <!--<varlistentry>
            <term>organisation</term>
            <listitem><para>This is your organisation, as defined by
                the owner address in your standard KDE
                addressbook.</para></listitem>
          </varlistentry>-->
        </variablelist>
      </para>
      <para>Any macro not in the above list is treated as a editable variable
        no matter the prefix.
        If the same variable occurs multiple times in the template, they can be
        edited at once after creating a document from the template.</para>
    </sect3>

    <sect3 id="katefiletemplates-cursor">
      <title>Setting the cursor position</title>
      <para>The special macro <userinput>${cursor}</userinput> will be replaced
        with a vertical bar and added to the end of the list of editable variables,
        independent on its location in the text.</para>
    </sect3>

  </sect2>
  <sect2>
    <title>Thanks and Acknowledgments</title>
    <para>
      &kate; Plugin <quote>File Templates</quote> copyright 2004 &Anders.Lund;
      &Anders.Lund.mail;.
    </para>
    <para>Documentation copyright 2004 &Anders.Lund;</para>
  </sect2>
</sect1>

<!-- from doc/kate-addons/xmlcheck.docbook -->
<sect1 id="kate-application-plugin-xmlcheck">
<sect1info>
<authorgroup><author>
<firstname>Daniel</firstname>
<surname>Naber</surname>
<affiliation><address>&Daniel.Naber.mail;</address></affiliation>
</author></authorgroup>
</sect1info>

<title>&XML; Validation</title>

<para>This plugin checks &XML; files for well-formedness and validity.</para>
<para>This plugin checks the current file. A list of warnings and errors
will appears at the bottom of &kate;'s main window. You can click on an error message
to jump to the corresponding place in the file. If the file has a <quote>DOCTYPE</quote>
the DTD given with this doctype will be used to check the file for validity. The
DTD is expected at a position relative to the current file, &eg; if the doctype
refers to <quote>DTD/xhtml1-transitional.dtd</quote> and the file is <filename>/home/peter/test.xml</filename>
the DTD is expected to be located at <filename>/home/peter/DTD/xhtml1-transitional.dtd</filename>.
However, remote DTDs specified via http are supported.</para>

<para>If the file has no doctype it will be checked for well-formedness.</para>

<para>To learn more about &XML; check out the <ulink url="http://www.w3.org/XML/"> official W3C &XML; pages</ulink>.</para>

<para>Internally this plugin calls the external command <command>xmllint</command>, which 
is part of libxml2. If this command is not correctly installed on your system, the plugin
will not work.</para>

<note><para>A temporary file needs to be written to the same folder as the file
that should be checked, so you need to have write access to that folder.</para></note>

<para>To load this plugin open &kate;s configuration dialog under <menuchoice><guimenu>Settings</guimenu>
<guimenuitem>Configure &kate;...</guimenuitem></menuchoice>.
Then select <guilabel>XML Validation</guilabel> which will appear
in the <guilabel>Application</guilabel> / <guilabel>Plugins</guilabel> section and close the dialog.
</para>

<sect2 id="xmlcheck-menu">
<title>Menu Structure</title>

<variablelist>
<varlistentry>
<term>
<menuchoice>
<guimenu>XML</guimenu>
<guimenuitem>Validate XML</guimenuitem>
</menuchoice>
</term>
<listitem><para>This will start the check, as described above.</para></listitem>
</varlistentry>
</variablelist>

</sect2>

<sect2 id="xmlcheck-thanks-and-acknowledgements">
<title>Thanks and Acknowledgments</title>
<para>
&kate; Plugin <quote>XML Validation</quote> copyright 2002 &Daniel.Naber;
&Daniel.Naber.mail;.
</para>
<para>Documentation copyright 2002 &Daniel.Naber;</para>

</sect2>
</sect1>

<sect1 id="kate-application-plugin-xmltools">
<sect1info>
<authorgroup><author>
<firstname>Daniel</firstname>
<surname>Naber</surname>
<affiliation><address>&Daniel.Naber.mail;</address></affiliation>
</author></authorgroup>
</sect1info>
<title>&XML; Completion</title>

<para>This plugin gives hints about what is allowed at a certain position in
an &XML; file, according to the file's DTD. It will list possible
elements, attributes, attribute values or entities, depending on the
cursor position (&eg; all entities are listed if the character on the left
of the cursor is <quote>&amp;</quote>). It's also possible to close the nearest
open tag on the left.</para>

<para>The <acronym>DTD</acronym> must exist in &XML; format, as produced by the Perl program
<command>dtdparse</command>. We will call a DTD in this format <quote>meta DTD</quote>. 
Some meta DTDs are supplied. They are installed in
<filename class="directory">$KDEDIR/share/apps/katexmltools/</filename>,
which is also the default folder when you choose
<guimenuitem>Assign Meta DTD...</guimenuitem>.
To produce your own meta DTDs, get <command>dtdparse</command> from
<ulink url="http://dtdparse.sourceforge.net">http://dtdparse.sourceforge.net</ulink>.</para>

<sect2 id="xmltools-how-to-use">
<title>How to Use</title>

<para>Start &kate; and open the configuration dialog under <menuchoice><guimenu>Settings</guimenu>
<guimenuitem>Configure &kate;...</guimenuitem></menuchoice>.
Then select <guilabel>XML Completion</guilabel> which will appear
in the <guilabel>Application</guilabel>/<guilabel>Plugins</guilabel> section and close the dialog. After
that, select <menuchoice><guimenu>XML</guimenu><guimenuitem>Assign Meta DTD...</guimenuitem></menuchoice>.
If your document contains no <quote>DOCTYPE</quote> or the doctype is unknown, you'll have to
select a meta DTD from the file system. Otherwise the meta DTD that
matches the current document's DOCTYPE will be loaded automatically.</para>

<para>You can now use the plugin while typing your text:</para>

<variablelist>

<varlistentry>
<term><keycap>&lt;</keycap> (less than key)</term>
<listitem><para>This will trigger a list of possible elements unless the
cursor is inside a tag already. Note that you currently cannot use
this to insert the top level element (&eg; <quote>&lt;html&gt;</quote>).</para></listitem>
</varlistentry>

<varlistentry>
<term><keycap>&lt;</keycap><keycap>/</keycap>(less than key + slash)</term>
<listitem><para>Entering these characters will offer closing the current element
(nearest open one to the left of the cursor). Press &Enter; to accept the suggestion.
Unlike the <guimenuitem>Close Element</guimenuitem> menu item, this works only with
a DTD assigned.</para></listitem>
</varlistentry>

<varlistentry>
<term><keycap>"</keycap> (quote key)</term>
<listitem><para>The quote key will trigger a list of possible attribute
values (if there are some) if you are inside a tag.</para></listitem>
</varlistentry>

<varlistentry>
<term><keycap>&nbsp;</keycap> (space key)</term>
<listitem><para>This key will trigger a list of possible attributes for the
current element if you are inside a tag.</para>
</listitem>
</varlistentry>

<varlistentry>
<term><keycap>&amp;</keycap> (ampersand key)</term>
<listitem><para>This key will trigger a list of named entities.</para></listitem>
</varlistentry>
</variablelist>

</sect2>

<sect2 id="xmltools-features-and-limitations">
<title>Features and Limitations</title>

<para>You can test all functions and limitations by loading
<filename>$KDEDIR/share/apps/katexmltools/testcases.xml</filename>
into &kate; and following the instructions.</para>

</sect2>


<sect2 id="xmltools-menu">
<title>Menu Structure</title>

<variablelist>
<varlistentry>
<term>
<menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;<keycap>Return</keycap></keycombo>
</shortcut>
<guimenu>XML</guimenu>
<guimenuitem>Insert Element...</guimenuitem>
</menuchoice>
</term>
<listitem><para>This will open a dialog that lets you insert an &XML; element.
The &lt;, &gt; characters and the closing tag will be inserted automatically.
If you have selected text when this menu item is selected, the selected
text will be surrounded by the opening and the closing tag.
The dialog also offers completion of all elements that may be inserted
at the current cursor position if you have assigned a meta DTD by
using <guimenuitem>Assign Meta DTD...</guimenuitem>.
</para></listitem>
</varlistentry>

<varlistentry>
<term>
<menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;<keycap>&lt;</keycap></keycombo>
</shortcut>
<guimenu>XML</guimenu>
<guimenuitem>Close Element</guimenuitem>
</menuchoice>
</term>
<listitem><para>This will search your text for a tag that is not yet closed
and will close it by inserting the corresponding closing tag.
The search starts at the cursor position and goes left. If
it cannot find an open tag nothing will happen.</para></listitem>
</varlistentry>

<varlistentry>
<term>
<menuchoice>
<guimenu>XML</guimenu>
<guimenuitem>Assign Meta DTD...</guimenuitem>
</menuchoice>
</term>
<listitem><para>This will tell the plugin which meta DTD to use for the
current document. Note that this assignment will not be saved.
You will have to repeat it when you start &kate; the next time.</para></listitem>
</varlistentry>
</variablelist>

</sect2>

<sect2 id="xmltools-thanks-and-acknowledgements">
<title>Thanks and Acknowledgments</title>
<para>
&kate; Plugin <quote>&XML; Completion</quote> copyright 2001,2002 &Daniel.Naber;
&Daniel.Naber.mail;.
</para>
<para>KDE SC 4 version copyright 2010 Tomáš Trnka</para>
<para>Documentation copyright 2001,2002 &Daniel.Naber;</para>
</sect2>

</sect1>

<sect1 id="kate-application-plugin-quickswitcher">
<!--<sect1info>
<authorgroup><author>
<firstname>T.C.</firstname>
<surname>Hollingsworth</surname>
<affiliation><address>tchollingsworth@gmail.com</address></affiliation>
</author></authorgroup>
</sect1info>-->
<title>Quick Document Switcher</title>

<sect2 id="quickswitcher-menu">
<title>Menu Structure</title>

<variablelist>
<varlistentry> 
<term><menuchoice><shortcut><keycombo action="simul">&Ctrl;<keycap>1</keycap>
</keycombo></shortcut><guimenu>Go</guimenu><guimenuitem>Quickswitch
</guimenuitem></menuchoice></term>
<listitem><para>Opens the <guilabel>Document Quick Switch</guilabel> dialog 
with a search field and a list of opened files. While entering text in the search 
field the document names and document urls are searched for matching text. 
While entering text in the search field you can use
the cursor keys <keysym>Up</keysym> and <keysym>Down</keysym> to navigate in the 
list view. If the dialog is left with <guilabel>OK</guilabel> the plugin switches 
the view to the document selected in the list view. This makes switching between 
documents easier, if there are a lot of them open.
</para></listitem>
</varlistentry>
</variablelist>

</sect2>
</sect1>

<sect1 id="kate-editor-plugin-exporter">
<!--<sect1info>
<authorgroup><author>
<firstname>T.C.</firstname>
<surname>Hollingsworth</surname>
<affiliation><address>tchollingsworth@gmail.com</address></affiliation>
</author></authorgroup>
</sect1info>-->
<title>Exporter</title>

<sect2 id="exporter-menu">
<title>Menu Structure</title>

<variablelist>
<varlistentry>
<term>
<menuchoice>
<guimenu>File</guimenu>
<guimenuitem>Export as HTML...</guimenuitem>
</menuchoice>
</term>
<listitem>
<para>
Export your file in &HTML; format so your document can be viewed as a web page.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<menuchoice>
<guimenu>Edit</guimenu>
<guimenuitem>Copy as HTML...</guimenuitem>
</menuchoice>
</term>
<listitem>
<para>Copies selected text with the syntax highlight as HTML text.</para>
</listitem>
</varlistentry>

</variablelist>
</sect2>
</sect1>

<sect1 id="kate-application-plugin-findinfiles">
<!--<sect1info>
<authorgroup><author>
<firstname>T.C.</firstname>
<surname>Hollingsworth</surname>
<affiliation><address>tchollingsworth@gmail.com</address></affiliation>
</author></authorgroup>
</sect1info>-->
<title>Find in Files</title>

<sect2 id="findinfiles-menu">
<title>Menu Structure</title>
<variablelist>

<varlistentry>
<term>
<menuchoice>
<guimenu>Edit</guimenu>
<guimenuitem>Find in Files...</guimenuitem>
</menuchoice>
</term>
<listitem>
<para>Launch the <guilabel>Find in Files</guilabel> dialog to allow you to
search for text in the files of a folder.</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<menuchoice>
<guimenu>View</guimenu><guisubmenu>Tool Views</guisubmenu>
<guimenuitem>Show Find in Files</guimenuitem>
</menuchoice>
</term>
<listitem>
<para>Toggle the display of &kate;'s <guilabel>Find in Files</guilabel> tool.
</para>
</listitem>
</varlistentry>

</variablelist>
</sect2>
</sect1>

<sect1 id="kate-application-plugin-searchinfiles">
<sect1info>
<authorgroup><author>
<firstname>T.C.</firstname>
<surname>Hollingsworth</surname>
<affiliation><address><email>tchollingsworth@gmail.com</email></address></affiliation>
</author></authorgroup>
</sect1info>
<title>Search in Files</title>

<sect2 id="searchinfiles-intro">
<title>Introduction</title>
<para>&kappname;'s Search in Files plugin allows you to search for text or
<link linkend="regular-expressions">regular expressions</link> in many different
files at once.  You can search all open files, or all the files in one directory,
and optionally its subdirectories.  You can even filter by filename, for instance
searching only files that end with a particular file extension.</para>

<para>The Search in Files plugin is not enabled by default, as it is new in &kappname;
3.7.  Enable it in the <link linkend="config-dialog-plugins">Plugins</link> panel
of &kappname;'s settings.  It will replace the old
<link linkend="kate-application-plugin-findinfiles">Find in Files plugin</link>
in the next version of &kappname;.</para>

</sect2>

<sect2 id="searchinfiles-ui">
<title>Interface</title>

<sect3 id="searchinfiles-ui-query">
<title>Search Query</title>

<para>The following options are always displayed at the top of the Search in
Files tool view:</para>

<variablelist>

<varlistentry>
<term><guiicon>New Tab</guiicon></term>
<listitem><para>
You can have as many searches as you want open at the same time.  Simply click
the <guibutton>New Tab</guibutton> button at the top-left corner of the Search
tool view and a new results tab will open permitting you to perform another
search.
</para></listitem>
</varlistentry>

<varlistentry>
<term>Query</term>
<listitem><para>
The long text box at the top is where you type in what you want to find.  You may
enter standard text, or a regular expression if enabled.
</para></listitem>
</varlistentry>

<varlistentry>
<term><guibutton>Search</guibutton></term>
<listitem><para>
When you've finished configuring everything, just press the
<guibutton>Search</guibutton> button to perform your search.  You may also press
&Enter; in the Query text box to do the same.
</para></listitem>
</varlistentry>

<varlistentry>
<term><guimenu>Location</guimenu></term>
<listitem><para>
This has two options.  Select <guilabel>in Open Files</guilabel> to search all
files currently open in &kappname;.  Select <guilabel>in Folder</guilabel> to
search inside a folder and optionally its subfolders.
</para></listitem>
</varlistentry>

<varlistentry>
<term><guimenu>Options</guimenu></term>
<listitem><para>
There are two available options.  If enabled, <guilabel>Match case</guilabel>
will restrict search results to only those that have the exact same combination
of upper and lower-case letters as your search query.  <guilabel>Regular
expressions</guilabel> permits you to use
<link linkend="regular-expressions">regular expressions</link> instead of simple
text as your search query.
</para></listitem>
</varlistentry>

<varlistentry>
<term><guiicon>Toggle Results</guiicon></term>
<listitem><para>
The down arrow in the top right-corner of the Search in Files tool view will
toggle the bottom half of the tool view between displaying additional options
for the Search in Folder mode and the results of your search.
</para></listitem>
</varlistentry>

</variablelist>
</sect3>

<sect3 id="searchinfiles-ui-folder">
<title>Search in Folder Options</title>

<para>These options are displayed below the aforementioned query options. If search
results are being displayed instead, press the <guiicon>Toggle Results</guiicon>
button to display them.  These options apply only when Search in Folder mode is
enabled.  If Search in Open Files is selected, they will be disabled.</para>

<variablelist>

<varlistentry>
<term><guilabel>Folder</guilabel></term>
<listitem><para>
You may enter the path of the folder you wish to search.  For instance, you might
enter <userinput>~/development/kde/kate/</userinput> if you wished to search the
&kate; source code.
</para></listitem>
</varlistentry>

<varlistentry>
<term><guiicon>Open file dialog</guiicon></term>
<listitem><para>
Press this button to locate for the folder in your desktop's folder browser.
</para></listitem>
</varlistentry>

<varlistentry>
<term><guiicon>Up</guiicon></term>
<listitem><para>
Press this button to change <guilabel>Folder</guilabel> to the parent of the
currently selected folder.
</para></listitem>
</varlistentry>

<varlistentry>
<term><guiicon>Restore Current Folder</guiicon></term>
<listitem><para>
This button will set the <guilabel>Folder</guilabel> entry to the folder in which
the currently open document is located.
</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Filter</guilabel></term>
<listitem><para>
This permits you to only search filenames that match a particular pattern.  For
instance, to only search files written in C++, change it to
<userinput>*.cpp</userinput>.  To search only files beginning with
<literal>kate</literal>, change it to <userinput>kate*</userinput>.
</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Recursive</guilabel></term>
<listitem><para>
If this option is enabled, &kappname; will also search in all subfolders of the
selected folder.
</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Include hidden</guilabel></term>
<listitem><para>
If this option is enabled, &kappname; will also search in files or folders that
are typically hidden by your &OS;.
</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Follow symbolic links</guilabel></term>
<listitem><para>
The Search in Files plugin typically doesn't follow
<ulink url="http://en.wikipedia.org/wiki/Symbolic_link">symbolic links</ulink>.
When this option is enabled, the plugin will follow them instead and search inside
the files or folders they reference.
</para>
<warning><para>It's possible for symbolic links to reference a folder that is the
parent of the folder currently being searched, or other folders that contain
symbolic links to their parent.  If there is such a link in the folder being
searched and this option is enabled, &kappname; will repeatedly follow the link
and search the folder, and the search will never complete.</para></warning>
</listitem>
</varlistentry>

</variablelist>
</sect3>

<sect3 id="searchinfiles-ui-results">
<title>Search Results</title>

<para>The results of your search are displayed below the query options.  If
options for Search in Folder mode are displayed, simply press the
<guiicon>Toggle Results</guiicon> button to display them.  They will also
automatically be displayed as soon as a search is performed.</para>

<para>The search results displays three columns providing information about each
result of your search query.  The <guilabel>File</guilabel> column shows the name
of the file.  The <guilabel>Line</guilabel> column displays the line number the
contents of your query were found in.  The <guilabel>Text</guilabel> column displays
the full text of that line.</para>

<para>To open the file your result was found in, simply double-click it.  &kappname;
will open the file if needed, and place the cursor at the beginning of the text
entered as your query as found in the file.</para>

</sect3>
</sect2>

<sect2 id="searchinfiles-menu">
<title>Menu Structure</title>
<variablelist>

<!--<varlistentry>
<term>
<menuchoice>
<guimenu>Edit</guimenu>
<guimenuitem>Find in Files...</guimenuitem>
</menuchoice>
</term>
<listitem>
<para>Launch the <guilabel>Find in Files</guilabel> dialog to allow you to
search for text in the files of a folder.</para>
</listitem>
</varlistentry>-->

<varlistentry>
<term>
<menuchoice>
<guimenu>View</guimenu><guisubmenu>Tool Views</guisubmenu>
<guimenuitem>Show Search in Files</guimenuitem>
</menuchoice>
</term>
<listitem>
<para>Toggle the display of &kappname;'s <guilabel>Search in Files</guilabel> tool.
</para>
</listitem>
</varlistentry>

</variablelist>
</sect2>
</sect1>

<sect1 id="kate-application-plugin-mail">
<!--<sect1info>
<authorgroup><author>
<firstname>T.C.</firstname>
<surname>Hollingsworth</surname>
<affiliation><address>tchollingsworth@gmail.com</address></affiliation>
</author></authorgroup>
</sect1info>-->
<title>Mail Files</title>

<sect2 id="mail-menu">
<title>Menu Structure</title>
<variablelist>

<varlistentry>
<term>
<menuchoice>
<guimenu>File</guimenu>
<guimenuitem>Mail...</guimenuitem>
</menuchoice>
</term>
<listitem>
<para>
Open your mail client and attach the file in the mail.
</para>
</listitem>
</varlistentry>

</variablelist>
</sect2>
</sect1>

<sect1 id="kate-application-plugin-fsbrowser">
<!--<sect1info>
<authorgroup><author>
<firstname>T.C.</firstname>
<surname>Hollingsworth</surname>
<affiliation><address>tchollingsworth@gmail.com</address></affiliation>
</author></authorgroup>
</sect1info>-->
<title>Filesystem Browser</title>

<para>The Filesystem Browser is a folder viewer, allowing you to open
files from a displayed folder in the current frame.</para>

<sect2 id="fsbrowser-menu">
<title>Menu Structure</title>
<variablelist>

<varlistentry>
<term>
<anchor id="view-toolviews-show-fileselector"/>
<menuchoice>
<guimenu>View</guimenu><guisubmenu>Tool Views</guisubmenu>
<guimenuitem>Show Filesystem Browser</guimenuitem>
</menuchoice>
</term>
<listitem>
<para>Toggle the display of &kate;'s Filesystem Browser</para>
</listitem>
</varlistentry>

</variablelist>
</sect2>

<sect2 id="fsbrowser-interface">
<title>Interface</title>

<para>From top down, the Filesystem Browser consist of the following
elements:</para>

<variablelist>
<varlistentry>
<term>A Toolbar</term>
<listitem>
<para>This contains standard navigations tool buttons:</para>
<variablelist>
<varlistentry>
<term><guibutton>Back</guibutton></term>
<listitem><para>Causes the folder view to <command>cd</command> to the previously displayed folder in the history.
This button is disabled, if there is no previous item.</para></listitem>
</varlistentry>
<varlistentry>
<term><guibutton>Forward</guibutton></term>
<listitem><para>Causes the folder view to <command>cd</command> to the next folder in the history.
This button is disabled, if there is no next folder.</para></listitem>
</varlistentry>
<!--varlistentry>
<term><guibutton>Parent Folder</guibutton></term>
<listitem><para>This will cause the folder view to <command>cd</command> to the immediate parent of the currently displayed
folder if possible.</para></listitem>
</varlistentry-->
<varlistentry>
<term><guibutton>Bookmarks</guibutton></term>
<listitem><para>Opens a submenu to edit or add bookmarks and to add a new bookmark folder.</para></listitem>
</varlistentry>
<varlistentry>
<term><guibutton>Current Document Folder</guibutton></term>
<listitem><para>This button will cause the folder view to
<command>cd</command> to the folder of the currently active
document if possible. This button is disabled, if the active document
is a new, unsaved file, or the folder in which it resides can not
be decided.</para></listitem>
</varlistentry>
<varlistentry>
<term><guibutton>Options</guibutton></term>
<listitem>
<variablelist>
<varlistentry>
<term><guimenuitem>Short View</guimenuitem></term>
<listitem><para>Displays only the filenames.</para></listitem>
</varlistentry>
<varlistentry>
<term><guimenuitem>Detailed View</guimenuitem></term>
<listitem><para>Displays <guilabel>Name</guilabel>, <guilabel>Date</guilabel>, 
<guilabel>Size</guilabel> and <guilabel>Type</guilabel> of the files.</para></listitem>
</varlistentry>
<varlistentry>
<term><guimenuitem>Tree View</guimenuitem></term>
<listitem><para>Like Short View, but folders can be expanded to view their contents.</para></listitem>
</varlistentry>
<varlistentry>
<term><guimenuitem>Detailed Tree View</guimenuitem></term>
<listitem><para>This also allows folders to be expanded, but displays the additional columns
available in Detailed View.</para></listitem>
</varlistentry>
<varlistentry>
<term><guimenuitem>Show Hidden Files</guimenuitem></term>
<listitem><para>Displays files normally hidden by your operating system.</para></listitem>
</varlistentry>
<varlistentry>
<term><guimenuitem>Automatically synchronize with current document</guimenuitem></term>
<listitem><para>When this option is enabled the filesystem browser will automatically <command>cd</command>
to the folder of the document currently open in the editing area every time it changes.</para></listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>

<varlistentry>
<term>A Location Entry</term>
<listitem>
<para>This displays a breadcrumb navigation to the currently open folder, like
&dolphin;.  You can click on a any folder to browse to it, or click on one of the
arrows to the left of a folder to select any folders beneath it.  You may also
select from your list of Places by clicking the leftmost icon in the breadcrumb
navigation, which displays an icon that represents your current Place.</para>

<para>You can also click to the right of the breadcrumbs to change them to a text box
where you can type the path of a folder to browse. The &URL;
entry maintains a list of previously typed paths. To choose one, use
the arrow button to the right of the entry.</para>
<tip><para>The &URL; entry has folder auto-completion. The completion
method can be set using the &RMB; menu of the text
entry.</para></tip>
</listitem>
</varlistentry>

<varlistentry>
<term>A Folder View</term>
<listitem><para>This is a standard &kde; folder view.</para></listitem>
</varlistentry>

<varlistentry>
<term>A Filter Entry</term>
<listitem>
<para>The Filter entry allows you to enter a filter for the files
displayed in the folder view. The filter uses standard globs; patterns
must be separated by white space. Example: <userinput>*.cpp *.h
*.moc</userinput></para>
<para>To display all files, enter a single asterisk
<userinput>*</userinput>.</para>
<para>The filter entry saves the last 10 filters entered between
sessions.  To use one, press the arrow button on the right of the entry
and select the desired filter string.  You can disable the filter by pressing
the <guibutton>Clear text</guibutton> button to the left of the autocompletion
arrow button.</para>
</listitem>
</varlistentry>

</variablelist>
</sect2>


<sect2 id="fsbrowser-config">
<title>Configuration</title>

<para>This plugin can be configured on the <guilabel>Filesystem Browser</guilabel> page
of <link linkend="configuring-kate-configdialog">&kate;'s configuration</link>.</para>

<variablelist>
<varlistentry>
<term><guilabel>Toolbar</guilabel></term>
<listitem><para>Configure the buttons on the file system browser toolbar
by moving the ones you want enabled to the <guilabel>Selected Actions</guilabel>
list, and order them using the arrow buttons at the side of the list.</para>
 </listitem>
</varlistentry>

</variablelist>
</sect2>
</sect1>

<!--some material from mdi.docbook needs to be migrated here too-->
<sect1 id="kate-application-plugin-exttools">
<!--<sect1info>
<authorgroup><author>
<firstname>T.C.</firstname>
<surname>Hollingsworth</surname>
<affiliation><address>tchollingsworth@gmail.com</address></affiliation>
</author></authorgroup>
</sect1info>-->
<title>External Tools</title>

<para>In the <guimenu>Tools</guimenu> menu you will find a submenu labeled
<guisubmenu>External Tools</guisubmenu>, if you have enabled them in &kate; settings.
These tools invoke external applications with data related to the current document,
for example its URL, directory, text or selection.</para>

<para>External tools are user defined, you can add, edit or remove tools using
the <link linkend="exttools-config">External Tools</link> configuration panel.
</para>

<sect2 id="exttools-menu">
<title>Menu Structure</title>
<variablelist>

<varlistentry>
<term><menuchoice><guimenu>Tools</guimenu><guisubmenu>External
Tools</guisubmenu></menuchoice></term>
<listitem><para>This submenu contains all the external tools you have
configured.</para></listitem>
</varlistentry>

</variablelist>
</sect2>

<sect2 id="exttools-config">
<title>Configuration</title>

<para>External tools are configured on the <guilabel>External Tools</guilabel> page
of <link linkend="configuring-kate-configdialog">&kate;'s configuration</link>. These tools invoke external
applications with data related to the current document, for example its URL,
directory, text or selection. This page allows you to manage the menu and edit,
remove or add new tools.</para>

<para>Each external tool is a shell command which contains macros representing
the document data. When activated, the macros are substituted with data from the
active document.</para>

<variablelist>
<title>Available Commands</title>

<varlistentry>
<term><guibutton>New</guibutton></term>
<listitem><para>Add a new external tool to the list.  This will launch the property
sheet described below where you can configure an external tool.</para></listitem>
</varlistentry>

<varlistentry>
<term><guibutton>Edit</guibutton></term>
<listitem><para>Edit the currently selected external tool, using the property
sheet described below.</para></listitem>
</varlistentry>

<varlistentry>
<term><guibutton>Insert Separator</guibutton></term>
<listitem><para>Adds a separator line that appears in the menu below the currently
selected item.</para></listitem>
</varlistentry>

<varlistentry>
<term><guibutton>Up Arrow</guibutton></term>
<listitem><para>Moves the currently selected item above the previous
one.</para></listitem>
</varlistentry>

<varlistentry>
<term><guibutton>Down Arrow</guibutton></term>
<listitem><para>Moves the currently selected item below the subsequent
one.</para></listitem>
</varlistentry>

</variablelist>

<variablelist>
<title>External Tools Properties</title>
<varlistentry>
<term><guilabel>Label</guilabel></term>
<listitem><para>A friendly label that will appear in the <guisubmenu>External Tools</guisubmenu> menu.</para></listitem>
</varlistentry>

<varlistentry>
<term><guibutton>Icon</guibutton></term>
<listitem><para>Allows you to select an icon that appears next to the label in the
<guisubmenu>External Tools</guisubmenu> menu.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Script</guilabel></term>
<listitem><para>The script to execute when the tool is activated. Before passing
the script to the shell, the following macros are substituted:

<variablelist>
<varlistentry>
<term><userinput>%URL</userinput></term>
<listitem><para>The full URL of the current document, or an empty string if the
document is unsaved.</para></listitem>
</varlistentry>

<varlistentry>
<term><userinput>%URLs</userinput></term>
<listitem><para>A space separated list of the URLs of all open documents
(except unsaved ones).</para></listitem>
</varlistentry>

<varlistentry>
<term><userinput>%directory</userinput></term>
<listitem><para>The directory part of the current documents URL or an empty
string if the current document is unsaved.</para></listitem>
</varlistentry>

<varlistentry>
<term><userinput>%filename</userinput></term>
<listitem><para>The filename of the current document without the path, or an
empty string if the current document is unsaved.</para></listitem>
</varlistentry>

<varlistentry>
<term><userinput>%line</userinput></term>
<listitem><para>The line number of the insertion cursor is in the current
document.</para></listitem>
</varlistentry>

<varlistentry>
<term><userinput>%column</userinput></term>
<listitem><para>The column number of the insertion cursor in the current
document.</para></listitem>
</varlistentry>

<varlistentry>
<term><userinput>%selection</userinput></term>
<listitem><para>The selected text in the current document, or an empty string
if no text is selected</para></listitem>
</varlistentry>

<varlistentry>
<term><userinput>%text</userinput></term>
<listitem><para>The full text of the current document. Beware that this may
potentially exceed the maximum command length allowed on your system.
Use with care.</para></listitem>
</varlistentry>

</variablelist>

</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Executable</guilabel></term>
<listitem><para>The main executable in the script. This is mandatory, and is used
to test if the command can be run at all. A fully qualified path is allowed
in case the executable is not in your <envar>PATH</envar> variable.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Mime types</guilabel></term>
<listitem><para>A semicolon separated list of mimetypes for which this command
should be enabled.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Save</guilabel></term>
<listitem><para>You can optionally select to have the current or all documents
saved prior to executing the script. This is handy if your script reads the file
from disk.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Command line name</guilabel></term>
<listitem><para>If you fill this, the tool will be available in the
<link linkend="advanced-editing-tools-commandline">editors command line</link> as
<command>exttool-<replaceable>Command Line Name</replaceable></command>
(the string you enter here prepended <quote>exttool-</quote>).</para></listitem>
</varlistentry>

</variablelist>
</sect2>
</sect1>

<!--
Missing (according to config docs)
Additional pages for enabled plugins: 
Kate Snippets
Backtrace Browser
Symbol Viewer
-->
</chapter>
