<para>The <application>&app;</application> application enables you to create and edit text files.</para>
<para>The aim of <application>&app;</application> is to be a simple and easy to use text editor. More powerful features can be enabled with different <firstterm>plugins</firstterm>, allowing a variety of tasks related to text-editing.</para>
</sect1>
<!-- ============= Getting Started =========================== -->
<para>The <application>&app;</application> window contains the following
elements: </para>
<variablelist>
<varlistentry> <term>Menubar</term>
<listitem>
<para>The menus on the menubar contain all of the commands you need to work with files in <application>&app;</application>.</para>
</listitem>
</varlistentry>
<varlistentry> <term>Toolbar</term>
<listitem>
<para> The toolbar contains a subset of the commands that you can access from the menubar.</para>
</listitem>
</varlistentry>
<varlistentry> <term>Display area</term>
<listitem>
<para> The display area contains the text of the file that you are editing. </para>
</listitem>
</varlistentry>
<varlistentry> <term>Statusbar</term>
<listitem>
<para>The statusbar displays information about current <application>&app;</application> activity and contextual information about the menu items. The statusbar also displays the following information:</para>
<itemizedlist>
<listitem>
<para>Cursor position: the line number and column number where the cursor is located.</para>
</listitem>
<listitem>
<para>Edit mode: If the editor is in insert mode, the statusbar contains the text <guilabel>INS</guilabel>. If the editor is in overwrite mode, the statusbar contains the text <guilabel>OVR</guilabel>. Press the <keycap>Insert</keycap> key to change edit mode.</para>
</listitem>
</itemizedlist>
</listitem>
</varlistentry>
<varlistentry> <term>Side Pane</term>
<listitem>
<para>The side pane displays a list of open documents, and other information depending on which plugins are enabled.</para>
<para>By default the side pane is not shown. To show it, choose <menuchoice><guimenu>View</guimenu><guimenuitem>Side Pane</guimenuitem></menuchoice>.</para>
</listitem>
</varlistentry>
<varlistentry> <term>Bottom Pane</term>
<listitem>
<para>By default the bottom pane is not shown. To show it, choose <menuchoice><guimenu>View</guimenu><guimenuitem>Bottom Pane</guimenuitem></menuchoice>.</para>
</listitem>
</varlistentry>
</variablelist>
<para>When you right-click in the <application>&app;</application> window, the application displays a popup menu. The popup menu contains the most common text editing commands. </para>
</sect2>
<!-- ============= To Open Multiple Files from the Command Line ========= -->
<para>You can run <application>&app;</application> from a command line and open a single file or multiple files. To open multiple files from a command line, type the following command, then press <keycap>Return</keycap>:</para>
<para>For more information on how to run <application>&app;</application> from a command line, see the unix manual page for &app;, <ulink url="man:xed" type="man"><citerefentry><refentrytitle>&app;</refentrytitle><manvolnum>1</manvolnum></citerefentry></ulink>.</para>
<para>To create a new document, choose <menuchoice><guimenu>File</guimenu><guimenuitem>New</guimenuitem></menuchoice>. The application displays a new blank document in the <application>&app;</application> window.</para>
</sect2>
<!-- ============= To Open a File ============================= -->
<para>To open a file, choose <menuchoice><guimenu>File</guimenu><guimenuitem>Open</guimenuitem></menuchoice> to display the <guilabel>Open File</guilabel> dialog. Select the file that you want to open, then click <guibutton>Open</guibutton>. The file is displayed in the <application>&app;</application> window. </para>
<para>The application records the paths and filenames of the five most recent files that you edited and displays the files as menu items on the <menuchoice><guimenu>File</guimenu></menuchoice> menu. You can also click on the <inlinemediaobject><imageobject><imagedata fileref="figures/xed_recent_files_menu_icon.png" format="PNG"/></imageobject><textobject><phrase>Shows Recent Files menu icon.</phrase></textobject></inlinemediaobject> icon on the toolbar to display the list of recent files. </para>
<note><para>You can open multiple files in <application>&app;</application>. The application adds a tab for each open file to the window. For more on this see <xref linkend="xed-tabs"/>.</para></note>
<para>You can save files in the following ways:</para>
<itemizedlist>
<listitem><para>To save changes to an existing file, choose <menuchoice><guimenu>File</guimenu><guimenuitem>Save</guimenuitem></menuchoice>. </para>
</listitem>
<listitem><para>To save a new file or to save an existing file under a new filename, choose <menuchoice> <guimenu>File</guimenu> <guimenuitem>Save As</guimenuitem> </menuchoice>. Enter a name for the file in the <guilabel>Save As</guilabel> dialog, then click <guibutton>Save</guibutton>. </para>
</listitem>
<listitem><para>To save all of the files that are currently open in <application>&app;</application>, choose <menuchoice> <guimenu>Documents</guimenu> <guimenuitem>Save All</guimenuitem> </menuchoice>.</para>
</listitem>
</itemizedlist>
<para>To close all of the files that are currently open in <application>&app;</application>, choose <menuchoice> <guimenu>Documents</guimenu> <guimenuitem>Close All</guimenuitem> </menuchoice>.</para>
</sect2>
<!-- ============= To Open a File from a URI ======================= -->
<para>Valid types of <replaceable>URI</replaceable> include <literal>http:</literal>, <literal>ftp:</literal>, <literal>file:</literal>, and all of the methods supported by <literal>gvfs</literal>.</para>
<para>Files from some types of URI are opened as read-only, and any changes you make must be saved to a different location. HTTP only allows files to be read. Files opened from FTP are read-only because because not all FTP servers may correctly work with saving remote files.</para>
</sect2>
<!-- ============= Working with tabs ======================== -->
<para>When more than one file is open, <application>&app;</application> shows a <firstterm>tab</firstterm> for each document above the display area. To switch to another document, click on its tab.</para>
<para>To move a document to another <application> &app;</application> window, drag the tab corresponding to the file to the window you want to move it to.</para>
<para>To move a document to a new <application> &app;</application> window, either drag its tab to the desktop, or choose <menuchoice> <guimenu>Documents</guimenu> <guimenuitem>Move to New Window</guimenuitem> </menuchoice>.</para>
</sect2>
</sect1>
<sect1 id="working-with-text">
<title>Working with Text</title>
<!-- ============= To Edit Text ================================ -->
<para>You can edit the text of a file in the following ways:</para>
<itemizedlist>
<listitem><para>Type new text from the keyboard. The blinking <firstterm>insertion cursor</firstterm> marks the point where new text appears. To change this, use the arrow keys on the keyboard or click with the mouse.</para>
</listitem>
<listitem><para>To copy the selected text to the clipboard, choose <menuchoice> <guimenu>Edit</guimenu> <guimenuitem>Copy</guimenuitem> </menuchoice>.</para>
</listitem>
<listitem><para>To delete the selected text from the file and move the selected text to the clipboard, choose <menuchoice> <guimenu>Edit</guimenu> <guimenuitem>Cut</guimenuitem> </menuchoice>.</para>
</listitem>
<listitem><para>To permanently delete the selected text from the file, choose <menuchoice> <guimenu>Edit</guimenu> <guimenuitem>Delete</guimenuitem> </menuchoice>.</para>
</listitem>
<listitem><para>To insert the contents of the clipboard at the cursor position, choose <menuchoice> <guimenu>Edit</guimenu> <guimenuitem>Paste</guimenuitem> </menuchoice>. You must cut or copy text before you can paste text into the file, either from &app; or another application.</para>
</listitem>
<listitem><para>To select all of the text in a file, choose <menuchoice> <guimenu>Edit</guimenu> <guimenuitem>Select All</guimenuitem> </menuchoice>. </para>
</listitem>
</itemizedlist>
</sect2>
<!-- ============== To Undo or Redo Edits ====================== -->
<para>To undo a change you have made, choose <menuchoice> <guimenu>Edit</guimenu> <guimenuitem>Undo</guimenuitem> </menuchoice>. To reverse this action, choose <menuchoice> <guimenu>Edit</guimenu> <guimenuitem>Redo</guimenuitem> </menuchoice>.</para>
<para>In <application>&app;</application>, there are two ways of searching for text. You can use the <guilabel>Find</guilabel> dialog to search for a specific piece of text, or <guilabel>Incremental Search</guilabel> to highlight matching text as you type it.
</para>
<!-- ============= To Find Text ================================ -->
<para>To search a file for a string of text, perform the following steps:</para>
<orderedlist>
<listitem><para>Choose <menuchoice> <guimenu>Search</guimenu> <guimenuitem>Find</guimenuitem> </menuchoice> to display the <guilabel>Find</guilabel> dialog.</para>
<listitem><para>Type the string that you want to find in the <guilabel>Search for</guilabel> field. You can include special characters such as a new line or tab: see <xref linkend="xed-find-escapes"/>.</para>
<listitem><para>Click <guibutton>Find</guibutton> to search the file for the first occurrence of the string after your current cursor position. If <application>&app;</application> finds the string, the application selects first occurrence of the string. Other occurrences of the string are highlighted.</para>
</listitem>
<listitem><para>To find the next occurrence of the string, click <guibutton>Find</guibutton> or choose <menuchoice> <guimenu>Search</guimenu> <guimenuitem>Find Next</guimenuitem> </menuchoice>. To find the previous occurrence of the text, choose <menuchoice> <guimenu>Search</guimenu> <guimenuitem>Find Previous</guimenuitem> </menuchoice>.</para>
</listitem>
</orderedlist>
<para>After you have closed the <guilabel>Find</guilabel> dialog, you can still move the selection to other occurrences of the text by choosing <menuchoice> <guimenu>Search</guimenu> <guimenuitem>Find Next</guimenuitem> </menuchoice> and <menuchoice> <guimenu>Search</guimenu> <guimenuitem>Find Previous</guimenuitem> </menuchoice>.</para>
<para>To remove the highlighting from the text, choose <menuchoice> <guimenu>Search</guimenu> <guimenuitem>Clear Highlight</guimenuitem> </menuchoice>.</para>
<para>Incremental search highlights matching text in the document as you type it letter by letter. (This is similar to the search feature in several web browsers.)</para>
<para>To start an incremental search, choose <menuchoice> <guimenu>Search</guimenu> <guimenuitem>Incremental Search</guimenuitem> </menuchoice>. The search box appears at the top of the display area. </para>
<para>Begin typing, and text that matches will be highlighted in the document. The first instance after the cursor position is also selected.</para>
<para>To advance the selection to the next match while keeping the incremental search box open, press <keycombo><keycap>Ctrl</keycap><keycap>G</keycap></keycombo>. Press <keycombo><keycap>Ctrl</keycap><keycap>Shift</keycap><keycap>G</keycap></keycombo> to go back to the previous match.</para>
<tip><para>You can also use the up and down arrow keys or the mouse wheel to move the selection between matches.</para></tip>
</sect2>
<!-- ============= To Find and Replace Text =================== -->
<para>To search a file for a string, and replace the string with an alternative string, perform the following steps:</para>
<orderedlist>
<listitem><para>Choose <menuchoice> <guimenu>Search</guimenu> <guimenuitem>Replace</guimenuitem> </menuchoice> to display the <guilabel>Replace</guilabel> dialog.</para>
<listitem><para>Type the string that you want to find, in the <guilabel>Search for</guilabel> field. You can include special characters such as a new line or tab: see <xref linkend="xed-find-escapes"/>.</para></listitem>
<listitem><para>Type the string that you want to use to replace the string that you find, in the <guilabel>Replace with</guilabel> field.</para>
</listitem>
</orderedlist>
<para>To examine each occurrence of the string before replacing it, click <guibutton>Find</guibutton>. If <application>&app;</application> finds the string, the application selects the string. Click <guibutton>Replace</guibutton> to replace the selected occurrence of the string. To find the next occurrence of the string, click <guibutton>Find</guibutton> again.</para>
<para>To replace all occurrences of the string throughout the document, click <guibutton>Replace All</guibutton>.</para>
</sect2>
<!-- ============= Find and Replace Options ============================ -->
<para>The <guilabel>Find</guilabel> dialog and the <guilabel>Replace</guilabel> dialog both have the following options:</para>
<itemizedlist>
<listitem><para>Select the <guilabel>Match case</guilabel> option to only find occurrences of the string that match the case of the text that you type. For example, with <guilabel>Match case</guilabel> selected, "TEXT" will not match "text".</para>
</listitem>
<listitem><para>Select the <guilabel>Match entire word only</guilabel> option to only find occurrences of the string that match the entire words of the text that you type. For example, with <guilabel>Match entire word only</guilabel> selected, "text" will not match "texture". <!-- translators, please make up your own example ;) --></para>
</listitem>
<listitem><para>Select the <guilabel>Search backwards</guilabel> option to search backwards towards the beginning of the document. </para>
</listitem>
<listitem><para>Select the <guilabel>Wrap around</guilabel> option to search to one end of the document and then continue the search from the other end of the file. </para>
</listitem>
</itemizedlist>
</sect2>
<!-- ============= Special Characters ============================ -->
<title>Positioning the Cursor on a Specific Line</title>
<para>To position the cursor on a specific line in the current file, choose <menuchoice> <guimenu>Search</guimenu> <guimenuitem>Go to Line</guimenuitem> </menuchoice>. The line number box appears at the top of the display area.</para>
<para>Begin typing the number of the line that you want to move the cursor to and the document will scroll to the specified line.</para>
<para>To dismiss the box and move the cursor to the specified line, press <keycap>Return</keycap>.</para>
<para>To set the page options, choose <menuchoice> <guimenu>File</guimenu> <guimenuitem>Page Setup</guimenuitem> </menuchoice> to display the <guilabel>Page Setup</guilabel> dialog.</para>
<para>The <guilabel>Page Setup</guilabel> dialog enables you to specify the following print options:</para>
<para>Select this option to print syntax highlighting. For more information about syntax highlighting, see <xref linkend="xed-set-highlightmode"/>. </para>
<para>Select the <guilabel>Print line numbers</guilabel> option to include line numbers when you print a file. </para>
<para>Use the <guilabel>Number every ... lines </guilabel> spin box to specify how often to print the line numbers, for example every 5 lines, every 10 lines, and so on. </para>
<para>Select the <guilabel>Enable text wrapping</guilabel> option to wrap text onto the next line, at a character level, when you print a file. The application counts wrapped lines as one line for line numbering purposes.
</para>
<para>Select the <guilabel>Do not split words over two lines</guilabel> option to wrap text onto the next line, at a word level, when you print a file.
<para>Click on this button to select the font to use to print line numbers.</para>
</listitem>
</varlistentry>
<varlistentry> <term><guilabel>Headers and footers</guilabel> </term>
<listitem>
<para>Click on this button to select the font to use to print the headers and footers in a file. </para>
</listitem>
</varlistentry>
</variablelist>
<para>To reset the fonts to the default fonts for printing a file from <application>&app;</application>, click <guibutton>Restore Default Fonts</guibutton>.</para>
</sect3>
</sect2>
<!-- ============= To Print a File ============================ -->
<para>You can use <application>&app;</application> to perform the following print operations:</para>
<itemizedlist>
<listitem><para>Print a document to a printer. </para>
</listitem>
<listitem><para>Print the output of the print command to a file.</para>
</listitem>
</itemizedlist>
<para>If you print to a file, <application>&app;</application> sends the output of the file to a pre-press format file. The most common pre-press formats are PostScript and Portable Document Format (PDF).</para>
<para>To preview the pages that you want to print, choose <menuchoice> <guimenu>File</guimenu> <guimenuitem>Print Preview</guimenuitem> </menuchoice>.</para>
<para>To print the current file to a printer or a file, choose <menuchoice> <guimenu>File</guimenu> <guimenuitem>Print</guimenuitem> </menuchoice> to display the <guilabel>Print</guilabel> dialog.</para>
<para>The <guilabel>Print</guilabel> dialog enables you to specify the following print options:</para>
<para>Select one of the following options to determine how many pages to print:</para>
<itemizedlist>
<listitem>
<para><guilabel>All</guilabel></para>
<para>Select this option to print all of the pages in the file.</para>
</listitem>
<listitem>
<para><guilabel>Lines</guilabel></para>
<para>Select this option to print the specified lines only. Use the <guilabel>From</guilabel> and <guilabel>To</guilabel> spin boxes to specify the line range.</para>
</listitem>
<listitem>
<para><guilabel>Selection</guilabel></para>
<para>Select this option to print the selected text only. This option is only available if you select text.</para>
<para>Use this drop-down list to select the printer settings.
</para>
<para>To configure the printer, click <guibutton>Configure</guibutton>. For example, you can enable or disable duplex printing, or schedule delayed printing, if this functionality is supported by the printer.
<para>Use this drop-down list to select the page layout. A preview of each layout that you select is displayed in the <guilabel>Preview</guilabel> area.</para>
<para>Several of <application>&app;</application>'s features for programming are provided with plugins. For example, the Tag List plugin provides a list of commonly-used tags for different markup languages: see <xref linkend="xed-tag-list-plugin"/>.</para>
<para>Syntax highlighting makes source code easier to read by showing different parts of the text in different colors.</para>
<para><application>&app;</application> chooses an appropriate syntax highlighting mode based on a document's type. To override the syntax highlighting mode, choose <menuchoice> <guimenu>View</guimenu> <guimenuitem>Highlight Mode</guimenuitem> </menuchoice>, then choose one of the following menu items:</para>
<variablelist>
<varlistentry>
<term><guimenuitem>Normal</guimenuitem></term>
<listitem>
<para>Do not display any syntax highlighting.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guisubmenu>Sources</guisubmenu></term>
<listitem>
<para>Display syntax highlighting to edit source code. Use the <guisubmenu>Sources</guisubmenu> submenu to select the source code type.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guisubmenu>Markup</guisubmenu></term>
<listitem>
<para>Display syntax highlighting to edit markup code. Use the <guisubmenu>Markup</guisubmenu> submenu to select the markup code type.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guisubmenu>Scripts</guisubmenu></term>
<listitem>
<para>Display syntax highlighting to edit script code. Use the <guisubmenu>Scripts</guisubmenu> submenu to select the script code type.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guisubmenu>Others</guisubmenu></term>
<listitem>
<para>Display syntax highlighting to edit other types of code. Use the <guisubmenu>Others</guisubmenu> submenu to select the code type.</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<!-- ============= To Pipe the Output of a Command to a File ======= -->
<para>You can use <application>&app;</application> to pipe the output of a command to a text file. For example, to pipe the output of an <command>ls</command> command to a text file, type <command>ls | xed</command>, then press <keycap>Return</keycap>.</para>
<para>The output of the <command>ls</command> command is displayed in a new text file in the <application>&app;</application> window.</para>
<para>Alternatively, you can use the <application>External tools</application> plugin to pipe command output to the current file. <!-- fixme: xref needed! --></para>
<para>Use shortcut keys to perform common tasks more quickly than with the mouse and menus. The following tables list all of <application>&app;</application>'s shortcut keys.</para>
<para>To configure <application>&app;</application>, choose <menuchoice> <guimenu>Edit</guimenu> <guimenuitem>Preferences</guimenuitem> </menuchoice>. The <guilabel>Preferences</guilabel> dialog contains the following categories:</para>
<para>Select the <guilabel>Enable text wrapping</guilabel> option to have long lines of text flow into paragraphs instead of running off the edge of the text window. This avoids having to scroll horizontally</para>
<para>Select the <guilabel>Do not split words over two lines</guilabel> option to have the text wrapping option preserve whole words when flowing text to the next line. This makes text easier to read.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Line Numbers</guilabel></term>
<listitem>
<para>Select the <guilabel>Display line numbers</guilabel> option to display line numbers on the left side of the <application>&app;</application> window. </para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Current Line</guilabel></term>
<listitem>
<para>Select the <guilabel>Highlight current line</guilabel> option to highlight the line where the cursor is placed. </para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Right Margin</guilabel></term>
<listitem>
<para>Select the <guilabel>Display right margin</guilabel> option to display a vertical line that indicates the right margin. </para>
<para>Use the <guilabel>Right margin at column</guilabel> spin box to specify the location of the vertical line. </para>
<para>Select the <guilabel>Highlight matching bracket</guilabel> option to highlight the corresponding bracket when the cursor is positioned on a bracket character. </para>
<para>Use the <guilabel>Tab width</guilabel> spin box to specify the width of the space that <application> &app;</application> inserts when you press the <keycap>Tab</keycap> key. </para>
<para>Select the <guilabel>Insert spaces instead of tabs</guilabel> option to specify that <application> &app;</application> inserts spaces instead of a tab character when you press the <keycap>Tab</keycap> key. </para>
<para>Select the <guilabel>Enable auto indentation</guilabel> option to specify that the next line starts at the indentation level of the current line. </para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>File Saving</guilabel> </term>
<listitem>
<para>Select the <guilabel>Create a backup copy of files before saving</guilabel> option to create a backup copy of a file each time you save the file. The backup copy of the file contains a ~ at the end of the filename.</para>
<para>Select the <guilabel>Autosave files every ... minutes</guilabel> option to automatically save the current file at regular intervals. Use the spin box to specify how often you want to save the file.</para>
<para>Select the <guilabel>Use default theme font</guilabel> option to use the default system font for the text in the <application>&app;</application> text window. </para>
<para>The <guilabel>Editor font</guilabel> field displays the font that <application>&app;</application> uses to display text. Click on the button to specify the font type, style, and size to use for text. </para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Color Scheme</guilabel></term>
<listitem>
<para>You can choose a color scheme from the list of color schemes. By default, the following color schemes are installed:</para>
<variablelist>
<varlistentry>
<term><guilabel>Classic</guilabel></term>
<listitem>
<para>Classic color scheme based on the gvim color scheme.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Cobalt</guilabel></term>
<listitem>
<para>Blue based color scheme.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Kate</guilabel></term>
<listitem>
<para>Color scheme used in the Kate text editor.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Oblivion</guilabel></term>
<listitem>
<para>Dark color scheme using the Tango color palette.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Tango</guilabel></term>
<listitem>
<para>Color scheme using the Tango color scheme.</para>
</listitem>
</varlistentry>
</variablelist>
<para>You can add a new color scheme by clicking on <guilabel>Add...</guilabel>, and selecting a color scheme file</para>
<para>You can remove the selected color scheme by clicking on <guilabel>Remove</guilabel></para>
<para>Plugins add extra features to <application>&app;</application>. For more information on plugins and how to use the built-in plugins, see <xref linkend="xed-plugins-overview"/>.</para>
<para>You can add extra features to <application>&app;</application> by enabling <firstterm>plugins</firstterm>. A plugin is a supplementary program that enhances the functionality of an application. Plugins add new items to the <application>&app;</application> menus for the new features they provide.
<para>To enable and disable plugins, or see which plugins are currently enabled, use the <link linkend="xed-prefs-plugins">Plugins Preferences</link>.</para>
<para><application><link linkend="xed-document-statistics-plugin">Document Statistics</link></application> shows the number of lines, words, and characters in the document. </para>
<para><application><!-- <link linkend="xed-file-browser-plugin">File Browser</link>-->File Browser</application> allows you to browse your files and folders in the side pane.</para>
<para><application><link linkend="xed-indent-lines-plugin">Indent Lines</link></application> adds or removes indentation from the selected lines.</para>
<para><application><link linkend="xed-insert-date-time-plugin">Insert Date/Time</link></application> adds the current date and time into a document.</para>
<para><application><link linkend="xed-modelines-plugin">Modelines</link></application> allows you to set editing preferences for individual documents, and supports <application>Emacs</application>, <application>Kate</application> and <application>Vim</application>-style modelines.</para>
<para><application><link linkend="xed-spell-checker-plugin">Spell Checker</link></application> corrects the spelling in the selected text, or marks errors automatically in the document.</para>
<para><application><link linkend="xed-tag-list-plugin">Tag List</link></application> lets you insert commonly-used tags for HTML and other languages from a list in the side pane.</para>
<para>The <application>Document Statistics</application> plugin counts the number of lines, words, characters with spaces, characters without spaces, and bytes in the current file. The plugin displays the results in a <guilabel>Document Statistics</guilabel> dialog. To use the Document Statistics plugin, perform the following steps:</para>
<orderedlist>
<listitem><para>Choose <menuchoice> <guimenu>Tools</guimenu> <guimenuitem>Document Statistics</guimenuitem> </menuchoice> to display the <guilabel>Document Statistics</guilabel> dialog. The <guilabel>Document Statistics</guilabel> dialog displays the following information about the file:
</para>
<itemizedlist>
<listitem><para>Number of lines in the current document.
</para>
</listitem>
<listitem><para>Number of words in the current document.
</para>
</listitem>
<listitem><para>Number of characters, including spaces, in the current document.
</para>
</listitem>
<listitem><para>Number of characters, not including spaces, in the current document.
</para>
</listitem>
<listitem><para>Number of bytes in the current document.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem><para>You can continue to update the <application>&app;</application> file while the <guilabel>Document Statistics</guilabel> dialog is open. To refresh the contents of the <guilabel>Document Statistics</guilabel> dialog, click <guibutton>Update</guibutton>.
<para>The <application>File Browser</application> Plugin shows your files and folders in the side pane, allowing you to quickly open files.</para>
<para>To view the File Browser, choose <menuchoice><guimenu>View</guimenu> <guimenuitem>Side Pane</guimenuitem> </menuchoice> and then click on the tab showing the File Browser icon at the bottom of the side pane.</para>
<para>The File Browser tab initially shows your file manager bookmarks. To browse the contents of any item, double-click it.</para>
<para>To show a parent folder, choose from the drop-down list, or press the up arrow on the File Browser's toolbar.</para>
<para>To show the folder that contains the document you are currently working on, right-click in the file list and choose <guimenuitem>Set root to active document</guimenuitem>.</para>
<para>To create a new, empty text file in the current folder shown in the browser, right-click in the file list and choose <guimenuitem>New File</guimenuitem>.</para>
<para>To create a new folder in the current folder shown in the browser, right-click in the file list and choose <guimenuitem>New Folder</guimenuitem>.</para>
<para>The amount of space used, and whether tab character or space characters are used, depends on the <guilabel>Tab Stops</guilabel> settings in the Editor Preferences: see <xref linkend="xed-prefs-editor"/>.</para>
<para>The <application>Insert Date/Time</application> plugin inserts the current date and time into a document. To use the Insert Date/Time plugin, perform the following steps:</para>
<orderedlist>
<listitem><para>Choose <menuchoice> <guimenu>Edit</guimenu> <guimenuitem>Insert Date and Time</guimenuitem> </menuchoice>. </para>
<para>If you have not configured the Insert Date/Time plugin to automatically insert the date/time without prompting you for the format, <application>&app;</application> displays the <guilabel>Insert Date and Time</guilabel> dialog. Select the appropriate date/time format from the list. Click <guibutton>Insert</guibutton> to close the <guilabel>Insert Date and Time</guilabel> dialog. <application>&app;</application> inserts the date/time at the cursor position in the current file. </para>
<para>If you have configured <application>&app;</application> to use one particular date/time format, the <guilabel>Insert Date and Time</guilabel> dialog is not displayed. The date/time is automatically entered at the cursor position in the current file. </para>
<listitem> <para>Select the <guilabel>Plugins</guilabel> tab.
</para>
</listitem>
<listitem> <para>Select the <guilabel>Insert Date/Time</guilabel> plugin.
</para>
</listitem>
<listitem> <para>Click <guibutton>Configure Plugin</guibutton> to display the <guilabel>Configure insert date/time plugin</guilabel> dialog.
</para>
</listitem>
<listitem> <para>Select one of the options, as follows: </para>
<itemizedlist>
<listitem><para>To specify the date/time format each time you insert the date/time, select the <guilabel>Prompt for a format</guilabel> option.
</para>
</listitem>
<listitem><para>To use the same <application>&app;</application>-provided date/time format each time you insert the date/time, select the <guilabel>Use the selected format</guilabel> option, then select the appropriate format from the list. When you select this option, <application>&app;</application> does not prompt you for the date/time format when you choose <menuchoice> <guimenu>Edit</guimenu> <guimenuitem>Insert Date and Time</guimenuitem> </menuchoice>.
</para>
</listitem>
<listitem><para>To use the same customized date/time format each time you insert the date/time, select the <guilabel>Use custom format</guilabel> option, then enter the appropriate format in the text box. For more information about how to specify a custom format, see <ulink url="man:strftime" type="man"><citerefentry><refentrytitle>strftime</refentrytitle><manvolnum>3</manvolnum></citerefentry></ulink>. When you select this option, <application>&app;</application> does not prompt you for the date/time format when you choose <menuchoice> <guimenu>Edit</guimenu> <guimenuitem>Insert Date and Time</guimenuitem> </menuchoice>.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem> <para>Click <guibutton>OK</guibutton> to close the <guilabel>Configure insert date/time plugin</guilabel> dialog.
</para>
</listitem>
<listitem> <para>To close the <guilabel>Preferences</guilabel> dialog, click <guibutton>Close</guibutton>.</para>
<para>The <application>Modelines</application> plugin allows you to set preferences for individual documents. A <firstterm>modeline</firstterm> is a line of text at the start or end of the document with settings that <application>&app;</application> recognises.</para>
<para>Preferences set using modelines take precedence over the ones specified in the preference dialog.</para>
<para>You can set the following preferences with modelines:</para>
<itemizedlist>
<listitem>
<para>Tab width</para>
</listitem>
<listitem>
<para>Indent width</para>
</listitem>
<listitem>
<para>Insert spaces instead of tabs</para>
</listitem>
<listitem>
<para>Text Wrapping</para>
</listitem>
<listitem>
<para>Right margin width</para>
</listitem>
</itemizedlist>
<para>The <application>Modelines</application> plugin supports a subset of the options used by other text editors <application>Emacs</application>, <application>Kate</application> and <application>Vim</application>.</para>
<para>The first two lines of a document are scanned for <application>Emacs</application> modelines.</para>
<para>The <application>Emacs</application> options for tab-width, indent-offset, indent-tabs-mode and autowrap are supported. For more information, see the <ulink type="http" url="http://www.delorie.com/gnu/docs/emacs/emacs_486.html">GNU Emacs Manual</ulink>.</para>
<para>The first and last ten lines a document are scanned for <application>Kate</application> modelines.</para>
<para>The <application>Kate</application> options for tab-width, indent-width, space-indent, word-wrap and word-wrap-column are supported. For more information, see the <ulink type="http" url="http://www.kate-editor.org/article/katepart_modelines">Kate website</ulink>.</para>
<para>The first and last three lines a document are scanned for <application>Vim</application> modelines.</para>
<para>The <application>Vim</application> options for et, expandtab, ts, tabstop, sw, shiftwidth, wrap, and textwidth are supported. For more information, see the <ulink type="http" url="http://vimdoc.sourceforge.net/htmldoc/options.html#modeline">Vim website</ulink>.</para>
<para>The <application>Sort</application> plugin arranges selected lines of text into alphabetical order.</para>
<caution><para>You cannot undo the Sort operation, so you should save the file before performing the sort. To revert to the saved version of the file after the sort operation, choose <menuchoice> <guimenu>File</guimenu> <guimenuitem>Revert</guimenuitem> </menuchoice>.
</para>
</caution>
<para>To use the Sort plugin, perform the following steps:</para>
<orderedlist>
<listitem>
<para>Select the lines of text you want to sort.</para>
</listitem>
<listitem><para>Choose <menuchoice> <guimenu>Edit</guimenu> <guimenuitem>Sort</guimenuitem> </menuchoice>. The <guilabel>Sort</guilabel> dialog opens.
</para>
</listitem>
<listitem><para>Choose the options you want for the sort:</para>
<itemizedlist>
<listitem>
<para>To arrange the text in reverse order, select <guilabel>Reverse order</guilabel>.
<listitem><para>To ignore case sensitivity, select <guilabel>Ignore case</guilabel>.
</para>
</listitem>
<listitem><para>To have the sort ignore the characters at the start of the lines, set the first character that should be used for sorting in the <guilabel>Start at column</guilabel> spin box.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem><para>To perform the sort operation, click <guibutton>Sort</guibutton>.
<para>The <application>Spell Checker</application> plugin checks the spelling in the selected text. You can configure <application>&app;</application> to check the spelling automatically, or you can check the spelling manually, in the specified language. The language setting, and the autocheck spelling properties, apply per document. To use the Spell checker plugin, perform the following steps:</para>
<orderedlist>
<listitem><para>Choose <menuchoice> <guimenu>Tools</guimenu> <guimenuitem>Set Language</guimenuitem> </menuchoice> to display the <guilabel>Set language</guilabel> dialog. Select the appropriate language from the list. Click <guibutton>OK</guibutton> to close the <guilabel>Set language</guilabel> dialog.
</para>
</listitem>
<listitem><para>To check the spelling automatically, choose <menuchoice> <guimenu>Tools</guimenu> <guimenuitem>Autocheck Spelling</guimenuitem> </menuchoice>. To unset the automatic spell check, choose <menuchoice> <guimenu>Tools</guimenu> <guimenuitem>Autocheck Spelling</guimenuitem> </menuchoice> again. When automatic spell checking is set, an icon is displayed beside the <guimenuitem>Autocheck Spelling</guimenuitem> menu item. Automatic spell checking is unset by default, each time <application>&app;</application> starts.</para>
<para>Unknown spellings are displayed in a different color, and underlined. Right-click on an unknown spelling, then select <guimenu>Spelling Suggestions</guimenu> from the popup menu:
</para>
<itemizedlist>
<listitem><para>To replace the unknown spelling with another spelling in the list, select the replacement spelling from the <guimenu>Spelling Suggestions</guimenu> popup menu.
</para>
</listitem>
<listitem><para>To add the unknown spelling to your personal dictionary, select <menuchoice> <guimenu>Spelling Suggestions</guimenu> <guimenuitem>Add</guimenuitem> </menuchoice>.
</para>
</listitem>
<listitem><para>To ignore all occurrences of the unknown spelling, so that they are no longer flagged as unknown but are not added to your personal dictionary, select <menuchoice> <guimenu>Spelling Suggestions</guimenu> <guimenuitem>Ignore All</guimenuitem> </menuchoice>. The unknown word is ignored in the current <application>&app;</application> session only.
<para>If there are no spelling errors, an <guilabel>Information</guilabel> dialog displays a message stating that the document does not contain misspelled words. Click <guibutton>OK</guibutton> to close the <guilabel>Information</guilabel> dialog.
</para>
<para>If there are spelling errors, the <guilabel>Check Spelling</guilabel> dialog is displayed:
</para>
<itemizedlist>
<listitem><para>The <guilabel>Misspelled word</guilabel> is displayed at the top of the dialog.
</para>
</listitem>
<listitem><para>A suggested known spelling is displayed in the <guilabel>Change to</guilabel> text box. You can replace this with another known spelling by selecting a spelling from the <guilabel>Suggestions</guilabel> list, or you can enter text directly into the <guilabel>Change to</guilabel> text box.
</para>
</listitem>
<listitem><para>To check the spelling of the text in the <guilabel>Change to</guilabel> text box, click <guibutton>Check Word</guibutton>. If this is a known word, the <guilabel>Suggestions</guilabel> list is replaced with the text <literal>(correct spelling)</literal>. If the word is not known, new entries appear in the <guilabel>Suggestions</guilabel> list.
</para>
</listitem>
<listitem><para>To ignore the current occurrence of the unknown word, click <guibutton>Ignore</guibutton>. To ignore all occurrences of the unknown word, click <guibutton>Ignore All</guibutton>. The unknown word is ignored in the current <application>&app;</application> session only.
</para>
</listitem>
<listitem><para>To change the current occurrence of the unknown word to the text in the <guilabel>Change to</guilabel> text box, click <guibutton>Change</guibutton>. To change all occurrences of the unknown word to the text in the <guilabel>Change to</guilabel> text box, click <guibutton>Change All</guibutton>.
</para>
</listitem>
<listitem><para>To add the unknown word to your personal dictionary, click <guibutton>Add word</guibutton>.
</para>
</listitem>
<listitem><para>To close the <guilabel>Check Spelling</guilabel> dialog, click <guibutton>Close</guibutton>.
<para>By default, the side pane shows a tab containing a list of open documents. Click on the tab showing a + icon at the bottom of the side pane to show the tag list tab.</para>
</listitem>
<listitem><para>Select the appropriate tag category from the drop-down list. For example, <guilabel>HTML - Tags</guilabel>.
</para>
</listitem>
<listitem><para>Scroll through the tag list to find the required tag.
</para>
</listitem>
<listitem><para>To insert a tag at the cursor position in the current file, double-click on the tag in the tag list. You can also insert a tag as follows:</para>
<itemizedlist>
<listitem><para>To insert a tag in the current file and change the focus from the side pane to the display area, press <keycap>Return</keycap>.
</para>
</listitem>
<listitem><para>To insert a tag in the current file and maintain the focus on the <guilabel>Tag list plugin</guilabel> window, press <keycombo><keycap>Shift</keycap><keycap>Return</keycap></keycombo>.