<!--pulled in by KWrite-->
<sect1 id="config-dialog-editor">
<title>The Editor Component Configuration</title>
<para>This group contains all pages related to the editor component of
&kappname;. Most of the settings here are defaults, they can be overridden by
<link linkend="pref-open-save-modes-filetypes">defining a filetype</link>,
by <ulink url="help:/kate/config-variables.html">Document Variables</ulink> or
by changing them per document during an editing session.</para>
<sect2 id="appearance"> <!-- updated to 4.7 + synced with kwrite -->
<title>Appearance</title>

<sect3 id="appearance-general">
<title>General</title>

<variablelist>
<varlistentry>
<term><guilabel>Dynamic Word Wrap</guilabel></term>
<listitem>
<para>If this option is checked, the text lines
will be wrapped at the view border on the screen.</para>
<variablelist>
<varlistentry>
<term><guilabel>Dynamic word wrap indicators (if applicable)</guilabel></term>
<listitem><para>Choose when the Dynamic word wrap indicators
should be displayed, either <guilabel>Off</guilabel>, <guilabel>Follow Line
Numbers</guilabel> or <guilabel>Always on</guilabel>.
</para></listitem></varlistentry>
<varlistentry>
<term><guilabel>Align dynamically wrapped lines
to indentation depth:
</guilabel></term>
<listitem><para>Enables the start of dynamically wrapped
lines to be aligned  vertically to the indentation level of the first
line.  This can help to make code and markup more
readable.</para><para>Additionally, this allows you to
set a maximum width of the screen, as a percentage,
after which dynamically wrapped lines will no longer be vertically aligned.
For example, at 50%, lines whose indentation levels are deeper than 50% of the
width of the screen will not have vertical alignment applied to subsequent
wrapped lines.</para></listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Whitespace Highlighting</guilabel></term>
<listitem>
<variablelist>
<varlistentry>
<term><guilabel>Highlight tabulators</guilabel></term>
<listitem><para>The editor will display a &raquo; symbol to indicate the presence
  of a tab in the text.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Highlight trailing spaces</guilabel></term>
<listitem><para>The editor will display dots to indicate the presence of extra
whitespace at the end of lines.</para></listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Advanced
</guilabel></term>
<listitem><para>
<variablelist>
<varlistentry>
<term><guilabel>Show indentation lines
</guilabel></term>
<listitem><para>If this is checked, the editor will display
vertical lines to help identifying indent lines.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Highlight range between selected brackets
</guilabel></term>
<listitem><para>If this is enabled, the range between the selected matching brackets will be highlighted.</para></listitem>
</varlistentry>
</variablelist>
</para></listitem>
</varlistentry>

</variablelist>
</sect3>

<sect3 id="appearance-borders">
<title>Borders</title>

<variablelist>
<varlistentry>
<term><guilabel>Borders</guilabel></term>
<listitem>
<variablelist>
<varlistentry>
<term><guilabel>Show folding markers (if available)
</guilabel></term>
<listitem><para>If this option is checked, the current view will display marks
for code folding, if code folding is available.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Show icon border
</guilabel></term>
<listitem><para>If this is checked, you will see an icon border on the left
hand side. The icon border shows bookmark signs for instance.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Show line numbers
</guilabel></term>
<listitem><para>If this is checked, you will see line numbers on the left
hand side.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Show line modification markers
</guilabel></term>
<listitem><para>If this is checked, line modification markers will be visible.
For more information, see <xref linkend="kate-part-line-modification"/>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Show scrollbar marks
</guilabel></term>
<listitem><para>If this option is checked the current view
will show marks on the vertical scrollbar. These marks will
for instance show bookmarks.</para></listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Sort Bookmarks Menu
</guilabel></term>
<listitem>
<variablelist>
<varlistentry>
<term><guilabel>By creation
</guilabel></term>
<listitem><para>Each new bookmark will be added to the bottom,
independently from where it is placed in the document.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>By position
</guilabel></term>
<listitem><para>The bookmarks will be ordered by the line
numbers they are placed at.</para></listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
</variablelist>

</sect3>
</sect2>

<sect2 id="prefcolors"><!-- checked for 4.7 + synced with kwrite -->
<title>Fonts &amp; Colors</title>

<para>This section of the dialog lets you configure all fonts and colors in
any color scheme you have, as well creating new schemes or deleting existing
ones. Each scheme has settings for colors, fonts and normal and highlight text
styles.
</para>

<para>&kappname; will preselect the currently active scheme for you, if you want to
work on a different scheme start by selecting that from the
<guilabel>Schema</guilabel> combobox. With the <guibutton>New</guibutton> and <guibutton>Delete</guibutton>
 button you can create a new scheme or delete existing ones.</para>
<para>At the bottom of the page you can select the <guilabel>Default schema for &kappname;</guilabel>.</para>

<para>By default, &kappname; will base its color scheme on the current &kde;
color scheme.  You can reset an individual color back to default by clicking the
reset arrow to the right of the entry in the color editor, or you can reset all
colors back to default by clicking the
<guibutton>Use &kde; Color Scheme</guibutton> at the bottom of the panel.</para>

<tip>
<para>You can adjust the &kde; color scheme in the
<ulink url="help:/kcontrol/colors/"><guilabel>Colors</guilabel> module in
&systemsettings;</ulink>.</para>
</tip>

<sect3 id="prefcolors-colors">
<title>Colors</title>

<variablelist>
<varlistentry id="variable-prefcolors-colors-text-background">
<term><guilabel>Editor Background Colors</guilabel></term>
<listitem>

<variablelist>

<varlistentry id="variable-pref-colors-normal-text">
<term><guilabel>Text Area</guilabel></term>
<listitem><para>This is the default background for the editor area, it will be
the dominant color on the editor area.</para></listitem>
</varlistentry>

<varlistentry id="variable-pref-colors-selected-text">
<term><guilabel>Selected Text</guilabel></term>
<listitem><para>This is the background for selected text. The default is
the global selection color, as set in your &kde; color preferences.
</para></listitem>
</varlistentry>

<varlistentry id="variable-pref-colors-current-line">
<term><guilabel>Current Line</guilabel></term>
<listitem><para>Set the color for the current line. Setting this a bit different
from the Normal text background helps to keep focus on the current line.
</para></listitem>
</varlistentry>

<varlistentry id="variable-pref-colors-search-highlight">
<term><guilabel>Search Highlight</guilabel></term>
<listitem><para>Set the color for the text that matches your last search.
</para></listitem>
</varlistentry>

<varlistentry id="variable-pref-colors-replace-highlight">
<term><guilabel>Replace Highlight</guilabel></term>
<listitem><para>Set the color for the text that matches your last replace
operation.</para></listitem>
</varlistentry>

<!--<varlistentry id="variable-pref-colors-marks">
<term><guilabel>Bookmark</guilabel></term>
<listitem><para>This combobox lets you set overlay colors for various mark types.
The color is mixed into the background color of a marked line, so that a line
with more marks or a marked line that is current has a background that is a mix
of more colors. The mark colors are also used if you enable display of scrollbar
marks.</para></listitem>
</varlistentry>-->

</variablelist>
</listitem>
</varlistentry>

<varlistentry id="variable-prefcolors-colors-icon-border">
<term><guilabel>Icon Border</guilabel></term>
<listitem>
<variablelist>

<varlistentry>
<term><guilabel>Background Area</guilabel></term>
<listitem><para>This color is used for the marks, line numbers and folding
marker borders in the left side of the editor view when they are displayed.
</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Line Numbers</guilabel></term>
<listitem><para>This color is used to draw the line numbers on the left side of
the view when displayed.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Word Wrap Marker</guilabel></term>
<listitem><para>This color is used to draw a pattern to the left of dynamically
wrapped lines when those are aligned vertically, as well as for the static word
wrap marker.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Code Folding</guilabel></term>
<listitem><para>This color is used to highlight the section of code that would
be folded when you click on the code folding arrow to the left of a document.
For more information, see
<ulink url="help:/kate/advanced-editing-tools-code-folding.html">the code
folding documentation</ulink>.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Modified Lines</guilabel></term>
<listitem><para>This color is used to highlight to the left of a document lines
that have been modified but not yet saved.  For more information, see
<xref linkend="kate-part-line-modification"/></para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Saved Lines</guilabel></term>
<listitem><para>This color is used to highlight to the left of a document lines
that have been modified this session and saved.  For more information, see
<xref linkend="kate-part-line-modification"/></para></listitem>
</varlistentry>

</variablelist>
</listitem>
</varlistentry>

<varlistentry id="variable-prefcolors-colors-text-decorations">
<term><guilabel>Text Decorations</guilabel></term>
<listitem>
<variablelist>

<varlistentry>
<term><guilabel>Spelling Mistake Line</guilabel></term>
<listitem><para>This color is used to indicate spelling mistakes.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Tab and Space Markers</guilabel></term>
<listitem><para>This color is used to draw white space indicators, when they are
enabled.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Bracket Highlight</guilabel></term>
<listitem><para>This color is used to draw the background of matching brackets.
</para></listitem>
</varlistentry>

</variablelist>
</listitem>
</varlistentry>

<varlistentry id="variable-prefcolors-colors-marker-colors">
<term><guilabel>Marker Colors</guilabel></term>
<listitem>
<variablelist>

<varlistentry>
<term><guilabel>Bookmark</guilabel></term>
<listitem><para>This color is used to indicate bookmarks.  For more information,
see <xref linkend="kate-part-bookmarks"/>.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Active Breakpoint</guilabel></term>
<listitem><para>This color is used by the GDB plugin to indicate an active
breakpoint.  For more information, see
<ulink url="help:/kate/kate-application-plugin-gdb.html">the GDB Plugin
documentation</ulink>.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Reached Breakpoint</guilabel></term>
<listitem><para>This color is used by the GDB plugin to indicate a breakpoint
you have reached while debugging.  For more information, see
<ulink url="help:/kate/kate-application-plugin-gdb.html">the GDB Plugin
documentation</ulink>.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Disabled Breakpoint</guilabel></term>
<listitem><para>This color is used by the GDB plugin to indicate an inactive
breakpoint.  For more information, see
<ulink url="help:/kate/kate-application-plugin-gdb.html">the GDB Plugin
documentation</ulink>.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Execution</guilabel></term>
<listitem><para>This color is used by the GDB plugin the line presently being
executed.  For more information, see
<ulink url="help:/kate/kate-application-plugin-gdb.html">the GDB Plugin
documentation</ulink>.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Warning</guilabel></term>
<listitem><para>This color is used by the build plugin to indicate a line that
has caused a compiler warning.  For more information, see
<ulink url="help:/kate/kate-application-plugin-build.html">the Build Plugin
documentation</ulink>.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Error</guilabel></term>
<listitem><para>This color is used by the build plugin to indicate a line that
has caused a compiler error.  For more information, see
<ulink url="help:/kate/kate-application-plugin-build.html">the Build Plugin
documentation</ulink>.</para></listitem>
</varlistentry>

</variablelist>
</listitem>
</varlistentry>

<varlistentry id="variable-prefcolors-colors-text-templates-snippets">
<term><guilabel>Text Templates &amp; Snippets</guilabel></term>
<listitem>
<variablelist>

<varlistentry>
<term><guilabel>Background</guilabel></term>
<listitem><para>This color is used by the &kate; Snippets plugin to mark the
background of a snippet.  For more information, see
<ulink url="help:/kate/kate-application-plugin-snippets.html">the &kate; Snippets
documentation</ulink>.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Editable Placeholder</guilabel></term>
<listitem><para>This color is used by the &kate; Snippets plugin to mark a
placeholder that you can click in to edit manually.  For more information, see
<ulink url="help:/kate/kate-application-plugin-snippets.html">the &kate; Snippets
documentation</ulink>.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Focused Editable Placeholder</guilabel></term>
<listitem><para>This color is used by the &kate; Snippets plugin to mark the
placeholder that you are presently editing.  For more information, see
<ulink url="help:/kate/kate-application-plugin-snippets.html">the &kate; Snippets
documentation</ulink>.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Not Editable Placeholder</guilabel></term>
<listitem><para>This color is used by the &kate; Snippets plugin to mark a
placeholder that cannot be edited manually, such as one that is automatically
populated.  For more information, see
<ulink url="help:/kate/kate-application-plugin-snippets.html">the &kate; Snippets
documentation</ulink>.</para></listitem>
</varlistentry>

</variablelist>
</listitem>
</varlistentry>

</variablelist>
</sect3>

<sect3 id="prefcolors-fonts">
<title>Fonts</title>
<para>
Here you can choose the font for the schema.  You can choose from
any font available on your system, and set a default size. A sample text
displays at the bottom of the dialog, so you can see the effect of your choices.
</para>
</sect3>

<sect3 id="prefcolors-normal-text-styles">
<title>Normal Text Styles</title>
<para>The normal text styles are inherited by the highlight text styles,
allowing the editor to present text in a very consistent way, for example comment
text is using the same style in almost all of the text formats that &kappname; can
highlight.</para>
<para>The name in the list of styles is using the style configured for
the item, providing you with an immediate preview when configuring a style.
</para>
<para>Each style lets you select common attributes as well as foreground
and background colors. To unset a background color, rightclick to use the
context menu.</para>
</sect3>

<sect3 id="prefcolors-highlighting-text-styles">
<title>Highlighting Text Styles</title>
<para>Here you can edit the text styles used by a specific highlight definition.
The editor preselects the highlight used by your current document. To work on a
different highlight, select one in the <guilabel>Highlight</guilabel> combobox
above the style list.
</para>
<para>The name in the list of styles is using the style configured for
the item, providing you with an immediate preview when configuring a style.
</para>
<para>Each style lets you select common attributes as well as foreground
and background colors. To unset a background color, rightclick to use the
context menu. In addition you can see if a style is equal to the default style
used for the item, and set it to that if not.</para>
<para>You will notice that many highlights contain other highlights represented
by groups in the style list. For example most highlights import the Alert
highlight, and many source code formats imports the Doxygen highlight. Editing
colors in those groups only affects the styles when used in the edited highlight
format.
</para>
</sect3>

</sect2>

<sect2 id="pref-edit">
<title>Editing</title>

<sect3 id="pref-edit-general">
<title>General</title>
<variablelist>

<varlistentry>
<term id="pref-word-wrap"><guilabel>Static Word Wrap</guilabel></term>
<listitem><para>
Word wrap is a feature that causes the editor to automatically start a new line
of text and move (wrap) the cursor to the beginning of that new line.  &kappname;
will automatically start a new line of text when  the current line reaches the
length specified by the <link linkend="pref-wrap-words-at">Wrap Words
At:</link> option.</para>
<variablelist>
<varlistentry>
<term><guilabel>Enable static word wrap</guilabel></term>
<listitem>
<para>Turns static word wrap on or off.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Show static word wrap markers
(if applicable)</guilabel></term>
<listitem>
<para>If this option is checked, a vertical line will be drawn at the word wrap
column as defined in the <menuchoice> <guimenu>Settings</guimenu>
<guimenuitem>Configure Editor...</guimenuitem></menuchoice> in the Editing tab.
Please note that the word wrap marker is only drawn if you use a fixed pitch
font.</para>
</listitem>
</varlistentry>
<varlistentry>
<term id="pref-wrap-words-at"><guilabel>Wrap words at:</guilabel></term>
<listitem>
<para>If the <link linkend="pref-word-wrap">Enable static word wrap</link> option is selected
this entry  determines the length (in characters) at which the editor will
automatically start a new line.</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>

<varlistentry>
<term ><guilabel>Misc</guilabel></term>
<listitem>
<variablelist>
<varlistentry>
<term><guilabel>Copy/Cut the current line if no selection</guilabel></term> <listitem>
<para>If this option is enabled and the text selection is empty, copy and cut
action are performed for the line of text at the actual cursor position.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Allow scrolling past the end of the document</guilabel></term> <listitem>
<para>This option lets you scroll past the end of the document. This can be used to vertically centre the bottom of the document, or put it on top of the current view.</para></listitem>
</varlistentry>

</variablelist>
</listitem>
</varlistentry>

</variablelist>
</sect3>

<sect3 id="pref-edit-cursor-selection">
<title>Cursor &amp; Selection</title>

<variablelist>

<varlistentry>
<term><guilabel>Text Cursor Movement</guilabel></term>
<listitem>
<variablelist>
<varlistentry>
<term><guilabel>Smart home and smart end</guilabel></term>
<listitem>
<para>When selected, pressing the home key will cause the cursor to
skip white space and go to the start of a line's text.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>PageUp/PageDown moves cursor</guilabel></term>
<listitem>
<para>This option changes the behavior of the cursor when the user presses
the <keycap>Page Up</keycap> or <keycap>Page Down</keycap> key. If unselected
the text cursor will maintain its relative position within the visible text in
&kappname; as new text becomes visible as a result of the operation.  So if the
cursor is in the middle of the visible text when the operation occurs it will
remain there (except when one reaches the beginning or end.)  With this option
selected, the first key press will cause the cursor to move to either the top or
bottom of the visible text as a new page of text is displayed.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Autocenter cursor (lines):</guilabel></term>
<listitem>
<para>Sets the number of lines to maintain visible above and below the cursor
when possible.</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Text Selection Mode</guilabel></term>
<listitem>
<variablelist>
<varlistentry>
<term><guilabel>Normal</guilabel></term>
<listitem>
<para>Selections will be overwritten by typed text and will be lost on
cursor movement.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Persistent</guilabel></term>
<listitem>
<para>Selections will stay even after cursor movement and typing.</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>

</variablelist>
</sect3>

<sect3 id="pref-edit-indent">
<title>Indentation</title>

<variablelist>

<varlistentry>
<term><guilabel>Default Indentation mode:</guilabel></term>
<listitem>
<para>Select the automatic indentation mode you want to use as default. It is
strongly recommended to use <userinput>None</userinput> or
<userinput>Normal</userinput> here, and use filetype configurations to set other
indentation modes for text formats like C/C++ code or &XML;.</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Indent using</guilabel></term>
<listitem>
<variablelist>
<varlistentry>
<term><guilabel>Tabulators</guilabel></term>
<listitem>
<para>When this is enabled the editor will insert tabulator characters when you
press the &Tab; key or use <link linkend="kate-part-autoindent">automatic
indentation</link>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Spaces</guilabel></term>
<listitem>
<para>When this is enabled the editor will insert a calculated number of spaces
according to the position in the text and the <option>tab-width</option> setting
when you press the &Tab; key or use <link linkend="kate-part-autoindent">automatic
indentation</link>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Tabulators and Spaces</guilabel></term>
<listitem>
<para>When this is enabled, the editor will insert spaces as describe above when
indenting or pressing &Tab; at the beginning of a line, but insert tabulators when
the &Tab; key is pressed in the middle or end of a line.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Tab width:</guilabel></term>
<listitem>
<para>This configures the number of spaces that are displayed in place of a tabulator
character.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Indentation width:</guilabel></term>
<listitem>
<para>The indentation width is the number of spaces which is used to indent a line.
If configured to indent using tabulators, a tabulator character is inserted
if the indentation is divisible by the tab width.</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Indentation Properties</guilabel></term>
<listitem>
<variablelist>
<varlistentry>
<term><guilabel>Keep Extra Spaces</guilabel></term>
<listitem><para>If this option is disabled, changing the indentation
level aligns a line to a multiple of the width specified in
<guilabel>Indentation width</guilabel>.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Adjust indentation of code pasted from the clipboard</guilabel></term>
<listitem>
<para>If this option is selected, pasted code from the clipboard is indented.
Triggering the <guimenuitem>Undo</guimenuitem> action removes the indentation.</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Indentation Actions</guilabel></term>
<listitem>
<variablelist>
<varlistentry>
<term><guilabel>Backspace key in leading blank space unindents</guilabel></term>
<listitem>
<para>If this option is selected, the &Backspace; key decreases the indentation level
if the cursor is located in the leading blank space of a line.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Tab key action (if no selection exists)</guilabel></term>
<listitem>
<para>
If you want &Tab; to align the current line in the current code block
like in emacs, make &Tab; a shortcut to the action <guimenuitem>Align</guimenuitem>.
</para>
<variablelist>
<varlistentry>
<term><guilabel>Always advance to the next tab position</guilabel></term>
<listitem>
<para>If this option is selected, the &Tab; key always inserts white space
so that the next tab position is reached. If the option <guilabel>Insert spaces instead of tabulators</guilabel>
on the <guilabel>General</guilabel> tab in the <guilabel>Editing</guilabel>
page is enabled, spaces are inserted; otherwise, a single tabulator is inserted.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Always increase indentation level</guilabel></term>
<listitem>
<para>If this option is selected, the &Tab; key always indents the current
line by the number of character positions specified in <guilabel>Indentation width</guilabel>.</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Increase indentation level if in leading blank space</guilabel></term>
<listitem>
<para>If this option is selected, the &Tab; key either indents the current line
or advances to the next tab position. If the insertion point is at or before the
first non-space character in the line, or if there is a selection, the current line
is indented by the number of character positions specified in <guilabel>Indentation width</guilabel>.
If the insertion point is located after the first non-space character in the line
and there is no selection, white space is inserted so that the next tab position is
reached: if the option <guilabel>Insert spaces instead of tabulators</guilabel>
on the <guilabel>General</guilabel> tab in the <guilabel>Editing</guilabel>
page is enabled, spaces are inserted; otherwise, a single tabulator is inserted.</para>
</listitem>
</varlistentry>
</variablelist>

</listitem>
</varlistentry>

</variablelist>
</listitem>
</varlistentry>

</variablelist>
</sect3>

<sect3 id="pref-edit-autocompletion">
<title>Auto Completion</title>
<variablelist>
<varlistentry>
<term><guilabel>General</guilabel></term>
<listitem>
<variablelist>
<varlistentry>
<term><guilabel>Enable auto completion</guilabel></term>
<listitem>
<para>If enabled, a word completion box automatically pops up during typing
showing a list of text entries to complete the current text under the
cursor.</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Minimal word length to complete</guilabel></term>
<listitem><para>While typing text, the word completion searches for words in the
document starting with the already typed text. This option configures the minimal
amount of characters that are needed to make the word completion active and pop
up a completion box.</para></listitem>
</varlistentry>

</variablelist>

</sect3>

<sect3 id="pref-edit-vi-input-mode">
<title>Vi Input Mode</title>
<variablelist>
<varlistentry>
<term><guilabel>General</guilabel></term>
<listitem>
<variablelist>
<varlistentry>
<term><guilabel>Use VI input mode</guilabel></term>
<listitem>
<para>When selected, the vi input mode will be enabled when opening a new view.
You can still toggle the vi input mode on/off for a particular view in the
<guimenu>Edit</guimenu> menu.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Let Vi commands override Kate shortcuts</guilabel></term>
<listitem>
<para>When selected, Vi commands will override &kappname;'s built-in commands. For
example: <keycombo action="simul">&Ctrl;<keycap>R</keycap></keycombo> will redo,
and override the standard action (showing the search and replace dialog).</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Hide the Vi mode status bar</guilabel></term>
<listitem>
<para>By default, an extra status bar will be used when the Vi input mode is
enabled. This status bar shows commands while they are being typed and
messages/errors produced by Vi commands.</para>
<para>Checking this option will hide this extra status line.</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Key Mapping</guilabel></term>
<listitem><para>
Key mapping is used to change the meaning of typed keys. This allows you to
move commands to other keys or make special keypresses for doing a series of
commands.</para>
<para>Example:</para>
<para><keycap>F2</keycap> -> <keycap>I--</keycap> &Esc;</para>
<para>This will prepend <keycap>I--</keycap> to a line when pressing <keycap>F2</keycap>.
</para>
</listitem>
</varlistentry>
</variablelist>

</sect3>

<sect3 id="pref-edit-spellcheck">
<title>Spellcheck</title>
<para>These configuration options are described in the documentation for the
&systemsettings; module <ulink url="help:kcontrol/spellchecking">Spell Checker</ulink>.</para>
</sect3>

</sect2>

<sect2 id="pref-open-save">
<title>Open/Save</title>

<sect3 id="pref-open-save-general">
<title>General</title>

<variablelist>

<varlistentry>
<term><guilabel>File Format</guilabel></term>
<listitem>
<variablelist>

<varlistentry>
<term><guilabel>Encoding:</guilabel></term>
<listitem>
<para>This defines the standard encoding to use to open/save files, if not changed
in the open/save dialog or by using a command line option.</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Encoding Detection</guilabel></term>
<listitem>
<para>Select an item from the drop down box, either to disable autodetection or
use <guilabel>Universal</guilabel> to enable autodetection for all encodings. But as
this may probably only detect utf-8/utf-16, selecting a region will use custom heuristics
for better results.
If neither the encoding chosen as standard above, nor the encoding specified
in the open/save dialog, nor the encoding specified on command line match
the content of the file, this detection will be run.</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Fallback Encoding</guilabel></term>
<listitem>
<para>This defines the fallback encoding to try for opening files if neither the
encoding chosen as standard above, nor the encoding specified in the open/
save dialog, nor the encoding specified on command line match the content of
the file.  Before this is used, an attempt will be made to determine the
encoding to use by looking for a byte order marker at start of file: if one
is found, the right unicode encoding will be chosen; otherwise encoding
detection will run, if both fail fallback encoding will be tried.</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>End of line:</guilabel></term>
<listitem>
<para>Choose your preferred end of line mode for your active
document. You have the choice between &UNIX;, DOS/&Windows; or Macintosh.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Automatic end of line detection</guilabel></term>
<listitem>
<para>Check this if you want the editor to autodetect the end of line
type. The first found end of line type will be used for the whole file.</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Enable byte order marker</guilabel></term>
<listitem>
<para>The byte order mark is a special sequence at the beginning of unicode
encoded documents. It helps editors to open text documents with the correct
unicode encoding. For more information see <ulink
url="http://en.wikipedia.org/wiki/Byte_Order_Mark">Byte Order Mark</ulink>.</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Line Length Limit</guilabel></term>
<listitem>
<para>Unfortunately, due to deficiencies in &Qt;, &kappname; experiences poor
performance when working with extremely long lines. For that reason, &kappname;
will automatically wrap lines when they are longer than the number of characters
specified here. To disable this, set this to <userinput>0</userinput>.</para>
</listitem>
</varlistentry>

</variablelist>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Automatic Cleanups on Load/Save</guilabel></term>
<listitem>
<variablelist>

<varlistentry>
<term><guilabel>Remove trailing spaces</guilabel></term>
<listitem>
<para>The editor will automatically eliminate extra spaces at the ends of lines
of text while loading/saving the file.</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Append newline at end of file on save</guilabel></term>
<listitem>
<para>The editor will automatically append a newline to the end of the file if
one is not already present upon saving the file.</para>
</listitem>
</varlistentry>

</variablelist>
</listitem>
</varlistentry>

</variablelist>
</sect3>

<sect3 id="pref-open-save-advanced">
<title>Advanced</title>
<variablelist>
<varlistentry>
<term><guilabel>Folder Config File</guilabel></term>
<listitem>
<variablelist>
<varlistentry>
<term><guilabel>Search depth for config file:</guilabel></term>
<listitem>
<para>The editor will search the given number of folder levels upwards
for &kappname; config file and load the settings line from it.
Further information about these hidden folder config files you find in the
<ulink url="help:/kate/config-variables.html">document variables section</ulink>.
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Backup on Save</guilabel></term>
<listitem><para>Backing up on save will cause &kappname; to copy the disk file to
&lt;prefix&gt;&lt;filename&gt;&lt;suffix&gt; before saving changes.
The suffix defaults to <emphasis role="bold">~</emphasis> and prefix is empty by
default. </para>
<variablelist>
<varlistentry>
<term><guilabel>Local files</guilabel></term>
<listitem>
<para>Check this if you want backups of local files when
saving.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Remote files</guilabel></term>
<listitem>
<para>Check this if you want backups of remote files when saving.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Prefix</guilabel></term>
<listitem>
<para>Enter the prefix to prepend to the backup file names.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Suffix</guilabel></term>
<listitem>
<para>Enter the suffix to add to the backup file names.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Disable swap file syncing</guilabel></term>
<listitem>
<para>&kappname; is able to recover (most of) what was written after last save in case
of a crash or power failure. A swap file (.swp.&lt;filename&gt;) is created
after the first editing action on a document. If the user doesn’t save the
changes and &kappname; crashes, the swap file remains on the disk. When opening a
file, &kappname; checks if there is a swap file for the document and if it is, it asks
the user whether he wants to recover the lost data or not. The user has the
possibility to view the differences between the original file and the recovered
one, too. The swap file is deleted after every save and on normal exit.</para>
<para>&kappname; syncs the swap files on the disk every 15 seconds, but only if they
have changed since the last sync. The user can disable the swap files syncing if
he wants, by checking the <guilabel>Disable swap file syncing</guilabel> box,
but this can lead to more data loss.</para>
</listitem>
</varlistentry>

</variablelist>
</listitem>
</varlistentry>

</variablelist>
</sect3>

<sect3 id="pref-open-save-modes-filetypes">
<title>Modes &amp; Filetypes</title>
<para>This page allows you to override the default configuration for documents
of specified mimetypes. When the editor loads a document, it will try if it
matches the file masks or mimetypes for one of the defined filetypes, and if so
apply the variables defined. If more filetypes match, the one with the highest
priority will be used.
</para>
<variablelist>
<varlistentry>
<term><guilabel>Filetype:</guilabel></term>
<listitem><para>The filetype with the highest priority is the one displayed in
the first drop down box. If more filetypes were found, they are
also listed.</para>
<variablelist>
<varlistentry>
<term><guilabel>New</guilabel></term>
<listitem><para>This is used to create a new filetype. After
you click on this button, the fields below get empty and you
can fill the properties you want for the new filetype.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Delete</guilabel></term>
<listitem><para>To remove an existing filetype, select it from the drop down
box and press the Delete button.</para></listitem>
</varlistentry>
</variablelist>
</listitem> </varlistentry>

<varlistentry>
<term><guilabel>Properties of <replaceable>current filetype</replaceable></guilabel></term>
<listitem><para>The filetype with the highest priority is the one displayed in
the first drop down box. If more filetypes were found, they are also
listed.</para>
<variablelist>
<varlistentry>
<term><guilabel>Name:</guilabel></term>
<listitem><para>The name of the filetype will be the text of the corresponding
menu item. This name is displayed in the
<menuchoice><guimenu>Tools</guimenu><guimenuitem>Filetypes</guimenuitem>
</menuchoice ></para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Section:</guilabel></term>
<listitem><para>The section name is used to organize the file types in
menus. This is also used in the
<menuchoice><guimenu>Tools</guimenu><guimenuitem>Filetypes</guimenuitem>
</menuchoice> menu.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Variables:</guilabel></term>
<listitem><para>This string allows you to configure &kappname;'s settings for the
files selected by this mimetype using &kappname; variables. You can set almost any
configuration option, such as highlight, indent-mode,
etc.</para>
<para>Press <guibutton>Edit</guibutton> to see a list of all available variables
and their descriptions.  Select the checkbox on the left to enable a particular
variable and then set the value of the variable on the right.  Some variables
provide a drop-down box to select possible values from while others require you
to enter a valid value manually.</para>
<para>For complete information on these variables, see
<ulink url="help:/kate/config-variables.html">Configuring with Document
Variables</ulink>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Highlighting:</guilabel></term>
<listitem><para>If you create a new file type, this drop down box allows you to
select a filetype for highlighting.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>Indentation Mode:</guilabel></term>
<listitem><para>The drop down box specifies the indentation mode for new
documents.</para></listitem>
</varlistentry>

<varlistentry>
<term><guilabel>File extensions:</guilabel></term>
<listitem><para>The wildcards mask allows you to select files by filename. A
typical mask uses an asterisk and the file extension, for example
<filename>*.txt; *.text</filename>. The string is a semicolon-separated list of
masks.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>MIME types:</guilabel></term>
<listitem><para>Displays a wizard that helps you easily select
mimetypes.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Priority:</guilabel></term>
<listitem><para>Sets a priority for this file type. If more than one file type
selects the same file, the one with the highest priority will be
used.</para></listitem>
</varlistentry>
</variablelist>
</listitem> </varlistentry>
<varlistentry>
<term><guibutton>Download Highlighting Files...</guibutton></term>
<listitem>
<para>
Click this button to download new or updated syntax highlight descriptions
from the &kappname; website.
</para>
</listitem>
</varlistentry>

</variablelist>
</sect3>

</sect2>

<sect2 id="pref-plugins">
<title>Extensions</title> <!-- updated to 4.7 + synced with kwrite -->
<para>The <guilabel>Plugins</guilabel> tab 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>
<title>Editor Component Plugins</title>
<!-- not released with 4.7
<varlistentry>
<term><guilabel>Artistic Comment</guilabel></term>
<listitem><para>Format long source-code comments like license-headers
or descriptions using different style.</para></listitem>
</varlistentry>
-->
<varlistentry>
<term><guilabel>AutoBrace</guilabel></term>
<listitem><para>The autobrace plugin supersedes the &kappname; 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><guilabel>Exporter</guilabel></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>
<!-- not in 4.7
<varlistentry>
<term><guilabel>Highlight Selection</guilabel></term>
<listitem><para>Highlights all words that match the currently selected text.</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>
</variablelist>
</sect2>
</sect1>
