<?xml version="1.0" encoding="UTF-8"?>
<chapter id="customizing">
    <title>Customizing jEdit</title>
    <!-- jEdit buffer-local properties: -->
    <!-- :tabSize=2:indentSize=2:noTabs=true:wrap=soft:maxLineLen=90: -->
    <!-- :xml.root=users-guide.xml: -->

    <section id="buffer-opts">
        <title>The Buffer Options Dialog Box</title>

        <para><guimenu>Utilities</guimenu>&gt;<guimenuitem>Buffer
        Options</guimenuitem> displays a dialog box for changing editor settings
        on a per-buffer basis. Changes made in this dialog box are not retained
        after the buffer is closed.</para>

        <para>The following settings can be changed here:</para>

        <itemizedlist>
            <listitem>
                <para>The line separator (see <xref
                linkend="line-separators" />)</para>
            </listitem>

            <listitem>
                <para>The character encoding (see <xref
                linkend="encodings" />)</para>
            </listitem>

            <listitem>
                <para>If the file should be GZipped on disk (see <xref
                linkend="opening" />)</para>
            </listitem>

            <listitem><para> Whether to show a dialog or auto-reload when 
            this buffer's file is changed on disk. </para></listitem>

            <listitem>
                <para>The edit mode (see <xref linkend="modes" />)</para>
            </listitem>

            <listitem>
                <para>The fold mode (see <xref linkend="folding" />)</para>
            </listitem>

            <listitem>
                <para>The automatic indentation scheme
                (see <xref linkend="autoindent" />)</para>
            </listitem>

            <listitem>
                <para>The wrap mode and margin (see <xref
                linkend="word-wrap" />)</para>
            </listitem>

            <listitem>
                <para>The tab width (see <xref linkend="indent" />)</para>
            </listitem>

            <listitem>
                <para>The indent width</para>
            </listitem>

            <listitem>
                <para>If soft tabs should be used (see <xref
                linkend="indent" />)</para>
            </listitem>
        </itemizedlist>
    </section>

    <section id="buffer-local">
        <title>Buffer-Local Properties</title>

        <para>Buffer-local properties provide an alternate way to change editor
        settings on a per-buffer basis. While changes made in the
        <guimenuitem>Buffer Options</guimenuitem> dialog box are lost after the
        buffer is closed, buffer-local properties take effect each time the file
        is opened, because they are embedded in the file itself.</para>

        <para>When jEdit loads a file, it checks the first and last 10 lines for
        colon-enclosed name/value pairs. For example, placing the following in a
        buffer changes the indent width to 4 characters, enables soft tabs, and
        activates the Perl edit mode:</para>

        <screen>:indentSize=4:noTabs=true:mode=perl:</screen>

        <para>Adding buffer-local properties to a buffer takes effect after the
        the buffer is saved and loaded again.</para>

        <para>The following table describes each buffer-local property in
        detail.</para>

        <informaltable>
            <tgroup cols="2">
                <colspec colnum="1" colwidth="1.5in" />
                <colspec colwidth="1*"/>

                <thead>
                    <row>
                        <entry>Property name</entry>
                        <entry>Description</entry>
                    </row>
                </thead>
                <tbody>
                    <row>
                        <entry><varname>collapseFolds</varname></entry>
                        <entry>Folds with a level of this or higher will be
                        collapsed when the buffer is opened. If set to zero, all
                        folds will be expanded initially. See <xref
                        linkend="folding" />.</entry>
                    </row>
                    <row>
                        <entry><varname>deepIndent</varname></entry>

                        <entry>When set to <quote>true</quote>, multiple-line
                        expressions delimited by parentheses are aligned like
                        so: <programlisting>retVal.x = (int)(horizontalOffset
    + Chunk.offsetToX(info.chunks,
                      offset));
</programlisting> With this setting disabled, the
                        text would look like so: <programlisting>retVal.x = (int)(horizontalOffset
    + Chunk.offsetToX(info.chunks,
    offset));
</programlisting></entry>
                    </row>

                    <row>
                        <entry><varname>folding</varname></entry>

                        <entry>The fold mode; one of <quote>none</quote>,
                        <quote>indent</quote>, <quote>explicit</quote>, or the
                        name of a plugin folding mode. See <xref
                        linkend="folding" />.</entry>
                    </row>

                    <row>
                        <entry><varname>indentSize</varname></entry>

                        <entry>The width, in characters, of one indent. Must be
                        an integer greater than 0. See <xref
                        linkend="indent" />.</entry>
                    </row>

                    <row>
                        <entry><varname>maxLineLen</varname></entry>

                        <entry>The maximum line length and wrap column position.
                        Inserting text beyond this column will automatically
                        insert a line break at the appropriate position. See
                        <xref linkend="entering-text" />.</entry>
                    </row>

                    <row>
                        <entry><varname>mode</varname></entry>

                        <entry>The default edit mode for the buffer. See <xref
                        linkend="modes" />.</entry>
                    </row>

                    <row>
                        <entry><varname>noTabs</varname></entry>

                        <entry>If set to <quote>true</quote>, soft tabs
                        (multiple space characters) will be used instead of
                        <quote>real</quote> tabs. See <xref
                        linkend="indent" />.</entry>
                    </row>

                    <row>
                        <entry><varname>noWordSep</varname></entry>

                        <entry>A list of non-alphanumeric characters that are
                        <emphasis>not</emphasis> to be treated as word
                        separators. Global default is <quote>_</quote>.</entry>
                    </row>

                    <row>
                        <entry><varname>tabSize</varname></entry>

                        <entry>The tab width. Must be an integer greater than 0.
                        See <xref linkend="indent" />.</entry>
                    </row>

                    <row>
                        <entry><varname>wordBreakChars</varname></entry>

                        <entry>Characters, in addition to spaces and tabs, at
                        which lines may be split when the word wrap mode is set
                        to <quote>hard</quote>. See <xref linkend="word-wrap"
                        />.</entry>
                    </row>

                    <row>
                        <entry><varname>wrap</varname></entry>

                        <entry>The word wrap mode; one of <quote>none</quote>,
                        <quote>soft</quote>, or <quote>hard</quote>. See <xref
                        linkend="word-wrap" />.</entry>
                    </row>

                    <row>
                        <entry><varname>autoIndent</varname></entry>

                        <entry>The automatic indentation scheme; one of
                        <quote>none</quote>, <quote>full</quote>, or
                        <quote>simple</quote>. See <xref linkend="autoindent" />.
                        </entry>
                    </row>
                </tbody>
            </tgroup>
        </informaltable>

        <para> You may see <literal>:encoding=XXX:</literal> in a file
        as it is a buffer-local property and specifying the character encoding
        for the file. But it is not really a buffer-local property, and behaves
        differently.
        It is detected by <literal>buffer-local-property</literal> detector
        only if the detector is selected in encoding options. Thus, it works
        only at loading, and it must appear near the top of the file.
        See <xref linkend="encodings"/>. </para>

    </section>

    <section id="global-opts">
        <title>The Global Options Dialog Box</title>

        <para><guimenu>Utilities</guimenu>&gt;<guimenuitem>Options</guimenuitem> displays
        the options dialog. It has 2 tabs, the first is <guimenu>Global Options</guimenu>.
        This tab contains several options panes, each containing a set of related options.
        Use the list on the left splitter to switch between panes. Only panes created by
        jEdit are described here; <guimenuitem>Plugin Options</guimenuitem> panes are
        created and documented by the plugins themselves. </para>

        <section id="general-pane">
            <title>The General Pane</title>
            <para>The <guibutton>General</guibutton> pane contains various
            settings, such as
            the number of recent files to remember, when to check for changed files,
            if the recent file list should be sorted, what current locale to use, 
            if caret positions or markers in buffers should be saved, 
            if previously open files or split configurations should be restored on startup, 
            and so on.</para>

            <formalpara><title> If Open Buffers Are Changed On Disk... </title>
            <para> If <guilabel>Do Nothing</guilabel> is selected, then modifications from
            jEdit will silently clobber changes made from other processes during saves.
            Don't use this option unless you know what you are doing! Also, changing this
            option here only affects newly opened buffers, not the ones that are currently 
            open. You can also change this setting for individual buffers from 
            Buffer Options. <xref linkend="buffer-opts"/> </para>
            </formalpara>

            <formalpara><title> Check for changed buffers upon... </title>
            <para> This option allows you choose additional times that jEdit checks for
            changed files on disk. For slow or remote file systems, removing unnecessary
            file status checks might improve performance. 
            Regardless of the choice here, files are still checked before
            save, unless <guilabel>Do Nothing</guilabel> is also selected 
            for the previous option. </para>
            </formalpara>

        </section>

        <section id="abbrevs-pane">
            <title>The Abbreviations Pane</title>

            <indexterm>
                <primary>Abbreviations</primary>

                <secondary>creating and editing</secondary>
            </indexterm>

            <para>The <guibutton>Abbreviations</guibutton> option pane can be
            used to enable or disable automatic abbreviation expansion, and to
            edit currently defined abbreviations.</para>

            <para>The combo box labelled <quote>Abbrev set</quote> selects the
            abbreviation set to edit. The first entry, <quote>global</quote>,
            contains abbreviations available in all edit modes. The subsequent
            entries correspond to each mode's local set of abbreviations.</para>

            <para>To change an abbreviation or its expansion, either
            double-click the appropriate table entry, or click a table entry and
            then click the <guibutton>Edit</guibutton> button. This will display
            a dialog box for modifying the abbreviation.</para>

            <para>The <guibutton>Add</guibutton> button displays a dialog box
            where you can define a new abbreviation. The
            <guibutton>Remove</guibutton> button removes the currently selected
            abbreviation from the list.</para>

            <para>See <xref linkend="positional-params" /> for information about
            positional parameters in abbreviations.</para>
        </section>

        <section id="appearance-pane">
            <title>The Appearance Pane</title>

            <para>The <guibutton>Appearance</guibutton> pane can be used to
            change the appearance of user interface controls such as buttons,
            labels and menus. It can also be used to change the icon set, or 
            look and feel, enable/disable the splash screen or
            system tray, and other appearance tweaks. You can also set the number of items
            retained in history text fields, see <xref linkend="history" />.</para>

        </section>


        <section id="context-pane">
            <title>The Context Menu Pane</title>

            <para>The <guibutton>Context Menu</guibutton> option pane edits the
            text area's right-click context menu. See <xref
            linkend="views" />.</para>
        </section>

        <section id="docking-pane">
            <title>The Docking Pane</title>

            <para>The <guibutton>Docking</guibutton> option pane shows a
            list of available dockables, and allows you to specify
            docking locations for each of them. Another way to
            specify docking locations is to use the popup menus associated with each dockable window. </para>

            <para> It is possible to configure jEdit to automatically load and/or save <emphasis role="bold">Docking Layouts</emphasis> (similar to eclipse perspectives) based on the edit mode of your current buffer through the checkboxes in this pane. See <xref linkend="docking" />.
            </para>

            <para> jEdit also supports alternate docking frameworks. If 
            the appropriate plugins are installed (Currently only MyDoggy
            is available), you can change docking frameworks from here. 
            </para>

        </section>

        <section id="editing-pane">
            <title>The Editing Pane</title>

            <para>The <guibutton>Editing</guibutton> option pane contains 3 tabs where
            settings such as the tab size, syntax highlighting and soft tabs on
            a global or mode-specific basis are made. </para>
            
            <para>The <guibutton>Mode Settings</guibutton> tab allows adjusting specific
            settings per mode. Changing these options does not change XML mode definition files on disk; it merely writes values to the user properties file which
            override those set in mode files. To find out how to edit mode files directly, see <xref linkend="writing-modes-part" />. Some of these options can be further overridden on an individual file basis through the use of buffer-local properties. </para>

            <para>The <literal>File name
            glob</literal> and <literal>First line glob</literal> text
            fields let you specify a glob pattern that paths and first lines of
            buffers will be matched against to determine the edit mode. See
            <xref linkend="globs" /> for information about glob patterns.</para>

            <para> The <literal>Extra Word Characters</literal> allows you to set the <literal>noLineSep</literal> buffer property on a mode-wide basis, allowing you to define what is considered part of a word when double-clicking on it in the text area.
            </para>

            <para> The <literal>Deep Indent</literal> option instructs jEdit to indent subsequent lines so that they line up with the open bracket on the previous line. </para>
            
            <para>The <guibutton>Edit Modes</guibutton> tab provides a setting to choose
            the default edit mode, the edit modes to display in the various 'mode'
            choosers, and the ability to manually add a new edit mode. Since there are now over 200 modes that jEdit recognizes, having the ability to reduce the number of choices in the 'mode' choosers to those needed by a user is a nice feature.</para>
            
            <para>This tab also provides a way to easily add and delete user modes.</para>
            
            <para>The <guibutton>Undo Settings</guibutton> tab allows setting the number of undo and whether to reset the undo history on save.</para>


        </section>

        <section id="encodings-pane">
            <title>The Encodings Pane</title>

            <para>This option pane offers
            users of jEdit many flexible options for defining how Encodings are handled in jEdit. See <xref linkend="encodings" /> for the
            basics.</para>

            <para>The default line separator character (see <xref linkend="line-separators" />) can be set from here. </para>

            <para> <guilabel>Use autodetection when possible</guilabel> is an option you can switch on or off.</para>

            <para>The <literal>List of Encoding Autodetector Names</literal>
            can be used to control what encoding detections are used on each file when it is loaded.
            The order they appear in this list determines the order of detectors that are tried.
            There are some detectors which are available with jEdit core:
            <itemizedlist>
              <listitem><para>
                <literal>BOM</literal>:
                detects <ulink url="http://www.unicode.org/faq/utf_bom.html#BOM">
                Byte Order Mark</ulink>.
              </para></listitem>
              <listitem><para>
                <literal>XML-PI</literal>:
                detects <ulink url="http://www.w3.org/TR/REC-xml/#charencoding">
                encoding declaration in XML Processing Instruction</ulink>.
              </para></listitem>
              <listitem><para>
                <literal>html</literal>:
                detects <ulink url="http://www.w3.org/TR/html4/struct/global.html#edef-META">
                charset description in HTML META element</ulink>.
              </para></listitem>
              <listitem><para>
                <literal>python</literal>:
                detects <ulink url="http://docs.python.org/reference/lexical_analysis.html#encoding-declarations">
                various encoding declaration accepted in Python</ulink>. This
                accepts encoding declarations for GNU Emacs or Bram Moolenaar's
                VIM.
              </para></listitem>
              <listitem><para>
                <literal>buffer-local-property</literal>:
                detects same syntax described at <xref linkend="buffer-local" />
                for property name "encoding". Note that unlike other buffer-local
                properties, this one will not work unless it is at the top of the file,
                and this appears in the list of encoding detectors.
              </para></listitem>
            </itemizedlist>
            Others can be defined in plugins as services and added to this
            space-separated list. See <ulink
            url="../api/org/gjt/sp/jedit/io/EncodingDetector.html">EncodingDetector</ulink>
            for details on how to offer additional encoding autodetector.</para>

            <para>The <literal>List of Fallback Encodings</literal> is used when
            a file fails to open in the default encoding, and the Encoding
            Autodetectors also fail. The list order here determines the order of
            encodings that are tried. Each is separated by a space. This is
            especially handy when doing directory searches through files of
            different encodings. We suggest using <literal>UTF-8</literal> as
            either your default or one of the fallback encodings.</para>

            <para>While jEdit allows you to edit files in a variety of different
            encodings, the average user switches between only 2 or 3. In other
            parts of jEdit, where the list of encodings is displayed in a
            combobox (such as the buffer options) or a menu (such as
            <guimenuitem>File - Reload with Encoding</guimenuitem> submenu) it
            may be desirable to display only a subset of available encodings,
            those that are in common local use. The Encodings checkbox list
            allows the user to select the subset of supported encodings to
            display in other GUI components that list all of the
            encodings.</para>
        </section>

        <section id="gutter-pane">
            <title>The Gutter Pane</title>

            <para>The <guibutton>Gutter</guibutton> option pane contains
            settings to customize the appearance of the gutter. You can
            customize values such as 
            "minimal number of digits to reserve for line numbers",
            and "fold style".  See <xref linkend="overview" />.</para>
        </section>

        <section id="mouse-pane">
            <title>The Mouse Pane</title>

            <para>The <guibutton>Mouse</guibutton> option pane contains settings
            for toggling drag and drop of text, as well as gutter mouse click
            behavior.</para>

            <para> The only option that may not be self-explanatory is the  <emphasis role="bold">Double-Click drag joins non-alphanumeric characters</emphasis>. This option means that double-click will select a region that includes the non-alphabetical characters, as defined for the current mode. The actual set of characters can be defined for an indiviual file via buffer-local properties (<literal>noWordSep</literal>) or on a mode-wide basis from the Editing option pane (<literal>Extra Word Characters</literal>).  </para>

        </section>

        <section id="pluginmgr-pane">
            <title>The Plugin Manager Pane</title>

            <para>The <guibutton>Plugin Manager</guibutton> pane contains a
            chooser for the desired download mirror, as well as various settings
            such as the directory where plugins are to be installed. In addition, you can set the time in minutes that the pluginlist can be cached from jedit.org, helping to reduce the server load. See <xref
            linkend="using-plugins" />.</para>
            
            <para> If the option <guimenuitem>Disable Obsolete Plugins</guimenuitem> is checked, then plugins
            that were released on Plugin Manager will be checked against the plugins you have
            installed, for those with a maximum jEdit version that is lower than the one you are 
            running. Plugins are marked with a maximum jEdit version when they are found to be broken or somehow
            incompatible with a given jEdit release. 
            Until an update is made available for such a plugin
            on Plugin Manager, these plugins are automatically unloaded and marked unsupported. This should improve the stability of jEdit.  </para>
            
            <para> If you re-enable a plugin that was disabled this way, it will remain loaded until the
            next time the plugin list is checked - whenever the user
            selects the <guibutton>Update</guibutton> or <guibutton>Install</guibutton> tab from Plugin Manager. If you un-check this option,
            then plugins will not be automatically disabled in this way. </para>
            
            
        </section>

        
        <section id="printing-pane">
            <title>The Printing Pane</title>

            <para>As of jEdit 5.3, all printing options have been moved to the printer dialog. See <xref linkend="printing" />.</para>
        </section>

        <section id="firewall-pane">
            <title>The Proxy Servers Pane</title>

            <para>The <guibutton>Proxy Servers</guibutton> option pane lets you
            specify HTTP and SOCKS proxy servers to use when jEdit makes network
            connections, for example when downloading plugins.</para>
        </section>

        <section id="saving-backup-pane">
            <title>The Saving and Backup Pane</title>

            <para>The <guibutton>Saving and Backup</guibutton> option pane contains
            settings for the autosave and backup features. See <xref
            linkend="autosave" /> and <xref linkend="backups" />.</para>

        </section>

        <section id="shortcuts-pane">
            <title>The Shortcuts Pane</title>

            <para>The <guibutton>Shortcuts</guibutton> option pane associates
            keyboard shortcuts with commands. Each command can have up to two
            shortcuts associated with it, and each shortcut can be a single
            or multiple key sequence. </para>

            <para>jEdit 5 introduces a new feature known as "keymaps". Each keymap is
            a named set of keyboard shortcut mappings.
            Default keymaps are found in jEdit's <literal>keymaps</literal> folder,
            and user customized keymaps are are stored in the
            user settings' <literal>keymaps</literal> folder. </para>

            <para> The top combobox allows you to <guilabel>Choose a Keymap</guilabel>,
            or a set of shortcuts.
            The "imported" keymap is automatically created and selected when jEdit needs
            to initially create a "keymaps" user settings folder.
            At this point, jEdit imports the existing shortcuts and places them into
            "imported". This makes it easy to bring in shortcuts
            from properties files that were customized with jEdit 4.5 or earlier. </para>

            <para> If a keymap of the same name exists in the defaults and the user settings
            directory, the user version is the one that is used in favor of the default.
            To take an existing keymap and customize it, select it, click
            <guibutton>duplicate</guibutton> and you will be asked for the name of the new
            keymap. A copy of that keymap will be
            saved in the user settings <literal>keymaps</literal> directory. At this point,
            this keymap will be selected and will determine where new shortcut properties are
            stored. To remove all customizations and restore a default keymap,
            click <guibutton>reset</guibutton>. </para>

            <para>The combo box below the keymap selector selects the
            command set to edit. Command sets exist for the set of all built-in
            commands, the commands of each plugin, and the set of macros.</para>

            <para>To change a shortcut, click the appropriate table entry and
            press the keys you want associated with that command in the
            resulting dialog box. The dialog box will warn you if the shortcut
            is already assigned. The properties will be saved in the currently selected
            keymap.
            </para>

        </section>

        <section id="status-bar-pane">
            <title>The Status Bar Pane</title>

            <para>The <guibutton>Status Bar</guibutton>, its API, and its corresponding option
            pane contains settings to customize
            which widgets are in the status bar, their order, and what separators exist
            between them. Also, you can disable it completely, for regular and/or plain views.
            See <xref linkend="status-bar" />.</para>

            <para> From the <literal>Options</literal> tab, you can
            customize information about the caret display in the lower
            left corner. </para>

            <para> Selecting the <literal>Widgets</literal> tab of this option pane shows
            you what widgets on the right, and their order. You can add or remove widgets
            and separators/labels here. </para>

        </section>


        <section id="syntax-hilite-pane">
            <title>The Syntax Highlighting Pane</title>

            <para>The <guibutton>Syntax Highlighting</guibutton> pane can be
            used to customize the fonts and colors for syntax highlighting. See
            <xref linkend="syntax-hilite" />.</para>
        </section>

        <section id="text-area-pane">
            <title>The Text Area Pane</title>

            <para>The <guibutton>Text Area</guibutton> pane contains settings to
            customize the appearance of the text area. </para>
            
            <para>You can configure the <guibutton>Text Font</guibutton>,
            antialias settings, colors, cursor style, highlight matching, and 
            word-completion settings from here. </para>
            
            <para><guibutton>Fractional Font Metrics</guibutton> is an old option
            that helps with certain versions of Java, but usually not in combination
            with subpixel antialiasing. </para>
            
            <para><guibutton>Additional Fonts with font substitution</guibutton> if checked,
            shows a list of <guibutton>Preferred fonts</guibutton>, as well as the following option.
            Fonts added to this list will determine the order jEdit searches 
            for glyphs that may be missing from your chosen 
            <guibutton>Text Font</guibutton>. </para>
            <para> If the 
            <guibutton>Font Substitution: Search all system fonts</guibutton> option is checked, <emphasis>all of the installed fonts</emphasis> 
            are searched for glyphs, after the preferred list is searched. If this option is checked, no fonts need to be added to preferred fonts list. 
            You probably don't want to un-check either of these options unless you want to test a system with limited fonts. </para>

        </section>

        <section id="toolbar-pane">
            <title>The Tool Bar Pane</title>

            <para>The <guibutton>Tool Bar</guibutton> option pane lets you edit
            the tool bar, or disable it completely. See <xref
            linkend="views" />.</para>
        </section>

        <section id="view-pane">
            <title>The View Pane</title>

            <para>The <guibutton>View</guibutton> option pane lets you change
            various settings related to the editor main window appearance,
            including the arrangement of dockable windows, whether the search bar
            and buffer switcher are visible, and whether menu, toolbar, and
            statusbar are visible in full-screen mode. See <xref
            linkend="views" />.</para>
            
            <para> You can choose the default bufferset scope here, as well as whether/how you want buffersets to be sorted in buffer switchers. See <xref linkend="buffersets"/> for more details. </para>
            
            <para> If <guimenuitem>Abbreviate paths with environment variables when
            possible</guimenuitem> is checked, you will notice that jEdit displays
            abbreviated versions of file paths when it can, using
            <literal>$VARIABLE/name.ext</literal> or
            <literal>%VARIABLE%\name.ext</literal> syntax, depending on your platform.
            Abbreviating is used in the File System Browser, as well as in the window
            title, and in plugins, to save horizontal space. Reverse-expansions also work
            as you would expect them to, with both syntaxes recognized on both platforms.
            </para>

        </section>

        <section id="vfs-browser-pane">
            <title>The File System Browser Panes</title>

            <para>The <guibutton>File System Browser</guibutton> group contains
            two option panes, <guibutton>General</guibutton> and
            <guibutton>Colors</guibutton>. The former contains various file
            system browser settings. The latter configures glob patterns used
            for coloring the file list. See <xref linkend="vfs-browser" /> for
            more information.</para>
        </section>
    </section>

    <section id="settings-directory">
        <title>The jEdit Settings Directory</title>

        <para>jEdit stores settings, keymaps, macros, and plugins as files inside the
        <firstterm>settings directory</firstterm>. In most cases, editing these
        files by hand is not necessary, since graphical tools and editor
        commands can do the job. However, being familiar with the structure of
        the settings directory still comes in handy in certain situations, for
        example when you want to copy jEdit settings between computers.</para>

        <para>The location of the settings directory is system-specific
        <footnote><para> On Linux, it is <literal>~/.jedit</literal>. 
           On Windows, you will find it in <literal>%APPDATA%\jEdit</literal>. 
           On the Mac, it is <literal>~/Library/jEdit</literal>. 
        </para></footnote>.
        It is printed to the activity log
        (<guimenu>Utilities</guimenu>&gt;<guisubmenu>Troubleshooting</guisubmenu>&gt;<guimenuitem>Activity
        Log</guimenuitem>). For example:</para>

        <screen>[message] jEdit: Settings directory is /home/slava/.jedit</screen>

        <para>Another way to find the location of your settings directory is to
        use the "Utilities" menu, then the "Settings Directory" menu item. The
        first item in the pullout menu is the location of your settings directory.
        </para>

        <para>Specifying the <userinput>-settings</userinput> switch on the
        command line instructs jEdit to store settings in a directory other than
        the default. For example, the following command will instruct jEdit to
        store all settings in the <filename>jedit</filename> subdirectory of the
        <filename>C:</filename> drive:</para>

        <screen><prompt>C:\jedit&gt;</prompt> <userinput>jedit -settings=C:\jedit</userinput></screen>

        <para>The <userinput>-nosettings</userinput> switch will force jEdit to
        not look for or create a settings directory; default settings will be
        used instead.</para>

        <!-- para>
   If you are using <application>jEditLauncher</application>
   to start jEdit on Windows, these parameters cannot be specified on the
   MS-DOS prompt command line when starting jEdit; they must be set as described
   in <xref linkend="launcher-starting" />.
  </para -->

        <para>jEdit creates the following files and directories inside the
        settings directory; plugins may add more:</para>

        <itemizedlist>
            <listitem>
                <para><filename>abbrevs</filename> - a plain text file which
                stores all defined abbreviations. See <xref
                linkend="abbrevs" />.</para>
            </listitem>

            <listitem>
                <para><filename>activity.log</filename> - a plain text file
                which contains the full activity log. See <xref
                linkend="activity-log" />.</para>
            </listitem>
            
            <listitem>
                <para><filename>history</filename> - a plain text file which
                stores history lists, used by history text fields and the
                <guimenu>Edit</guimenu>&gt;<guimenuitem>Paste
                Previous</guimenuitem> command. See <xref
                linkend="text-transfer" /> and <xref
                linkend="history" />.</para>
            </listitem>

            <listitem>
                <para><filename>jars</filename> - this directory contains
                plugins. See <xref linkend="using-plugins" />.</para>
            </listitem>

            <listitem>
                <para><filename>jars-cache</filename> - this directory contains
                plugin cache files which decrease the time to start jEdit. They
                are automatically updated when plugins are installed or
                updated.</para>
            </listitem>
            <listitem>
              <para><filename>keymaps</filename> - this directory
              contains collections of named keyboard shortcuts
              which can be defined from the Shortcuts Option Pane (see <xref linkend="shortcuts-pane"/>).  </para>
            </listitem>
              
            
            <listitem>
                <para><filename>killring.xml</filename> - stores recently
                deleted text. See <xref linkend="text-transfer" />.</para>
            </listitem>

            <listitem>
                <para><filename>macros</filename> - this directory contains
                macros. See <xref linkend="using-macros" />.</para>
            </listitem>

            <listitem>
                <para><filename>modes</filename> - this directory contains
                custom edit modes. See <xref
                linkend="writing-modes-part" />.</para>
            </listitem>

            <listitem>
                <para><filename>perspective.xml</filename> - an XML file that
                stores the list of open buffers and views used to maintain
                editor state between sessions.</para>
            </listitem>

            <listitem>
                <para><filename>PluginManager.download</filename> - this
                directory is usually empty. It only contains files while the
                plugin manager is downloading a plugin. For information about
                the plugin manager, see <xref linkend="using-plugins" />.</para>
            </listitem>
            <listitem><para>
              <filename>pluginMgr-Cached.xml.gz</filename> -
                this contains a cached copy of the last XML plugin list downloaded from plugin central. If you delete this file, a new one will be created next time you try to install a plugin via Plugin Manager. </para>
            </listitem>

            <listitem>
                <para><filename>printspec</filename> - a binary file that stores
                printing settings.</para>
            </listitem>

            <listitem>
                <para><filename>properties</filename> - a plain text file that
                stores the majority of jEdit's and its plugins settings. For
                more information see <xref linkend="propertiesfile" />.</para>
            </listitem>

            <listitem>
                <para><filename>recent.xml</filename> - an XML file which stores
                the list of recently opened files. jEdit remembers the caret
                position and character encoding of each recent file, and
                automatically restores those values when one of the files is
                opened.</para>
            </listitem>

            <listitem>
                <para><filename>registers.xml</filename> - an XML file that
                stores register contents. See <xref linkend="registers" /> for
                more information about registers.</para>
            </listitem>

            <listitem>
                <para><filename>server</filename> - a plain text file that only
                exists while jEdit is running. The edit server's port number and
                authorization key is stored here. See <xref
                linkend="starting" />.</para>
            </listitem>

            <listitem>
                <para><filename>settings-backup</filename> - this directory
                contains numbered backups of all automatically-written settings
                files.</para>
            </listitem>
            <listitem><para><filename>startup</filename> - This directory
              contains startup scripts in beanshell or other plugin-supported scripting
              languages. They are run at the time jEdit starts, after the <filename>startup</filename> scripts in the jEdit install directory have been run. See <xref linkend="startup-scripts" /></para>
            </listitem>
        </itemizedlist>

        <section id="propertiesfile">
            <title>The jEdit properties file</title>

            <para>The jEdit <literal>properties</literal> file uses the Java
            properties syntax to store key/value pairs. All of the values are
            stored as strings, but are interpreted as other types (such as
            integer or boolean) by plugins at runtime.</para>

            <para>Do not edit this file while jEdit is running. If you do, it
            is possible that your changes (either your edits, or jEdit settings 
            changes) may get lost. </para>
            
        </section>

        <section id="sitepropertiesfiles">
            <title>Site Properties</title>
            
            
            <para>
                You may also put properties files in the <filename>properties</filename> directory under 
                the jEdit home directory (NOT the jedit settings directory). You
                can locate the jEdit home directory by going to the Utilities menu
                directory, then the <guimenuitem>jEdit Home Directory</guimenuitem> menu item, and the first
                item in the pullout menu will be the location of the jEdit home
                directory. This is intended for site-wide settings. This lets you keep 
                custom user properties separate from the jEdit site-wide properties, so they are easier to find, edit, and move between machines. Note that your
                custom properties files must have ".props" as the file name extension.
            </para>
            <para> 
              Prior to jEdit 5.0, this was also where site-wide keyboard shortcuts were placed, but now you can define custom sets of shortcuts as keymap files. These files can be cloned and edited from the Shortcuts Option Pane, or edited by hand. To place them in a system-wide location, copy them into the <filename>keymaps</filename> folder under the jedit home directory. 
            </para>
            <para>
                Site properties files are read in alphabetically by file name. This means
                that if you have a property with the same name in more than one file,
                the value for that property will be the value found in the last file
                that was read.
            </para>
            <para>
                You can edit these files inside jEdit - changes made to these files will not be re-read until the next time jEdit is started.
            </para>
            
        </section>
    </section>
</chapter>
