The jEdit Settings Directory
Prev | Chapter 7. Customizing jEdit | Next

## The jEdit Settings Directory

jEdit stores settings, keymaps, macros, and plugins as files inside the settings directory. 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.

The location of the settings directory is system-specific [1]. It is printed to the activity log (Utilities>Troubleshooting>Activity Log). For example:

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

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.

Specifying the `-settings` 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 `jedit` subdirectory of the `C:` drive:

    C:\jedit> jedit -settings=C:\jedit

The `-nosettings` switch will force jEdit to not look for or create a settings directory; default settings will be used instead.

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

- `abbrevs` - a plain text file which stores all defined abbreviations. See the section called “Abbreviations”.

- `activity.log` - a plain text file which contains the full activity log. See Appendix B, The Activity Log.

- `history` - a plain text file which stores history lists, used by history text fields and the Edit>Paste Previous command. See the section called “Transferring Text” and Appendix C, History Text Fields.

- `jars` - this directory contains plugins. See Chapter 9, Installing and Using Plugins.

- `jars-cache` - this directory contains plugin cache files which decrease the time to start jEdit. They are automatically updated when plugins are installed or updated.

- `keymaps` - this directory contains collections of named keyboard shortcuts which can be defined from the Shortcuts Option Pane (see the section called “The Shortcuts Pane”).

- `killring.xml` - stores recently deleted text. See the section called “Transferring Text”.

- `macros` - this directory contains macros. See Chapter 8, Using Macros.

- `modes` - this directory contains custom edit modes. See Part II, “Writing Edit Modes”.

- `perspective.xml` - an XML file that stores the list of open buffers and views used to maintain editor state between sessions.

- `PluginManager.download` - this directory is usually empty. It only contains files while the plugin manager is downloading a plugin. For information about the plugin manager, see Chapter 9, Installing and Using Plugins.

- `pluginMgr-Cached.xml.gz` - 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.

- `printspec` - a binary file that stores printing settings.

- `properties` - a plain text file that stores the majority of jEdit's and its plugins settings. For more information see the section called “The jEdit properties file”.

- `recent.xml` - 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.

- `registers.xml` - an XML file that stores register contents. See the section called “General Register Commands” for more information about registers.

- `server` - a plain text file that only exists while jEdit is running. The edit server's port number and authorization key is stored here. See Chapter 2, Starting jEdit.

- `settings-backup` - this directory contains numbered backups of all automatically-written settings files.

- `startup` - This directory contains startup scripts in beanshell or other plugin-supported scripting languages. They are run at the time jEdit starts, after the `startup` scripts in the jEdit install directory have been run. See the section called “Startup Scripts”

### The jEdit properties file

The jEdit `properties` 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.

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.

### Site Properties

You may also put properties files in the `properties` 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 jEdit Home Directory 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.

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 `keymaps` folder under the jedit home directory.

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.

You can edit these files inside jEdit - changes made to these files will not be re-read until the next time jEdit is started.

[1] On Linux, it is `~/.jedit`. On Windows, you will find it in `%APPDATA%\jEdit`. On the Mac, it is `~/Library/jEdit`.

Prev | Up | Next
The Global Options Dialog Box | Home | Chapter 8. Using Macros