<term>As can be seen, many details can be defined, namely:</term>
<listitem>
<para><userinput>Name</userinput>, the name of the tool, which will later appear in the menu.</para>
<para><userinput>Icon</userinput>, optional icon that is visible in the menu.</para>
<para><userinput>Executable</userinput>, executable including either a full path, or your executable must be in the <envar>PATH</envar> environment variable.</para>
<para><userinput>Arguments</userinput>, optional arguments that are passed to the executable.</para>
<para><userinput>Input</userinput>, optional input that is passed to the process via stdin.</para>
<para><userinput>Working directory</userinput>, the working directory the tool will be started in. If empty, the working directory is set to the current document’s path.</para>
<para><userinput>Mime types</userinput>, if set, the tool is active only if the current document’s mime type matches.</para>
<para><userinput>Save</userinput>, when invoked, saves none, the current document, or all documents.</para>
<para><userinput>Reload current document after execution</userinput>, useful when the current file is modified on disk.</para>
<para><userinput>Output</userinput>, the output defines the target of stdout. It is either set to <userinput>Ignored</userinput>, <userinput>Insert at Cursor Position</userinput>, <userinput>Replace Selected Text</userinput>, <userinput>Replace Current Document</userinput>, <userinput>Append to Current Document</userinput>, <userinput>Insert in New Document</userinput>, <userinput>Copy to Clipboard</userinput>, or <userinput>Display in Pane</userinput>.</para>
<para><userinput>Editor command</userinput>, optional command that can be used to invoke the external tool via the built-in <ulink url="help:/katepart/advanced.html#advanced-editing-tools-commandline">command line</ulink>.</para>
</listitem>
</varlistentry>
</variablelist>
<para>The button <guilabel>Defaults</guilabel> is visible only for tools that
are shipped with Kate. When clicked, all tool’s settings reverted to default
The first form <userinput>%{variable-name}</userinput> simply replaces the
variable with its contents. For instance, the variable <userinput>%{Document:FileName}</userinput>
is replaced by the current document’s filename without its path.
The second form <userinput>%{variable-name:≶value>}</userinput> gets the
<userinput><value></userinput> as contents. For example, this can be used
to expand an environment variable with <userinput>%{ENV:HOME}</userinput>,
or one can obtain the current date in the preferred format like
<userinput>%{Date:yyyy-MM-dd}</userinput>.
</para>
<variablelist>
<varlistentry>
<term>Supported variables include:</term>
<listitem>
<para><userinput>Document:FileBaseName</userinput>: File base name without path and suffix of the current document.</para>
<para><userinput>Document:FileExtension</userinput>: File extension of the current document.</para>
<para><userinput>Document:FileName</userinput>: File name without path of the current document.</para>
<para><userinput>Document:FilePath</userinput>: Full path of the current document including the file name</para>
<para><userinput>Document:Text</userinput>: Contents of the current document.</para>
<para><userinput>Document:Path</userinput>: Full path of the current document excluding the file name.</para>
<para><userinput>Document:NativeFilePath</userinput>: Full document path including file name, with native path separator (backslash on Windows).</para>
<para><userinput>Document:NativePath</userinput>: Full document path excluding file name, with native path separator (backslash on Windows).</para>
<para><userinput>Document:Cursor:Line</userinput>: Line number of the text cursor position in current document (starts with 0).</para>
<para><userinput>Document:Cursor:Column</userinput>: Column number of the text cursor position in current document (starts with 0).</para>
<para><userinput>Document:Cursor:XPos</userinput>: X component in global screen coordinates of the cursor position.</para>
<para><userinput>Document:Cursor:YPos</userinput>: Y component in global screen coordinates of the cursor position.</para>
<para><userinput>Document:Selection:Text</userinput>: Text selection of the current document.</para>
<para><userinput>Document:Selection:StartLine</userinput>: Start line of selected text of the current document.</para>
<para><userinput>Document:Selection:StartColumn</userinput>: Start column of selected text of the current document.</para>
<para><userinput>Document:Selection:EndLine</userinput>: End line of selected text of the current document.</para>
<para><userinput>Document:Selection:EndColumn</userinput>: End column of selected text of the current document.</para>
<para><userinput>Document:RowCount</userinput>: Number of rows of the current document.</para>
<para><userinput>Date:Locale</userinput>: The current date in current locale format.</para>
<para><userinput>Date:ISO</userinput>: The current date (ISO).</para>
<para><userinput>Date:<value></userinput>: The current date (<ulink url="https://doc.qt.io/qt-5/qdate.html#toString">QDate formatstring</ulink>).</para>
<para><userinput>Time:Locale</userinput>: The current time in current locale format.</para>
<para><userinput>Time:ISO</userinput>: The current time (ISO).</para>
<para><userinput>Time:<value></userinput>: The current time (<ulink url="https://doc.qt.io/qt-5/qtime.html#toString">QTime formatstring</ulink>).</para>
<para><userinput>ENV:<value></userinput>: Access to environment variables.</para>