The File System Browser

Utilities>File System Browser displays a file system browser. By default, the file system browser is shown in a floating window; it can be set to dock into the view in the Docking pane of the Utilities>Global Options dialog box; see the section called "Window Docking".

The file system browser can be customized in the Utilities>Global Options dialog box.

Navigating the File System

The directory to browse is specified in the Path text field. Clicking the mouse in the text field automatically selects its contents allowing a new path to be quickly typed in. If a relative path is entered, it will be resolved relative to the current path. This text field remembers previously entered strings; see Appendix C. Previously browsed directories are also listed in the File>Recent Directories menu; selecting one opens it in the file system browser.

To browse higher up in the directory hierarchy, click one of the parent directories in the parent directory list.

Files and directories in the file list are shown in different colors depending on what glob patterns their names match. The patterns and colors can be customized in the File System Browser>Colors pane of the Utilities>Global Options dialog box.

To browse a listed directory, double-click it (or if you have a three-button mouse, you can click the middle mouse button as well). Alternatively, click the disclosure widget next to a directory to list its contents in place.

Open files in the file list are shown with their file names underlined. Single-clicking an open file will select the appropriate buffer in the current view. Unopened files can be opened for editing by double-clicking (or by clicking the middle mouse button). If you hold down Shift while double-clicking (or middle-clicking), the file will be opened in a new view.

Clicking a file or directory with the right mouse button displays a popup menu containing file manipulation commands. Note that attempting to delete a directory containing files will give an error; only empty directories can be deleted.

If you only want to see a specific set of files (for example, those whose names end with .java), enter a glob pattern in the Filter text field. See Appendix D for information about glob patterns. This text fields remembers previously entered strings; see Appendix C.

Tip

The file list sorting algorithm used in jEdit handles numbers in file names in an intelligent manner. For example, a file named section10.xml will be placed after a file named section5.xml. A conventional letter-by-letter sort would have placed these two files in the wrong order.

The Tool Bar

The file system browser has a tool bar containing a number of icons. These buttons correspond to the items in the Commands menu described below; the only menu item that does not have a corresponding tool bar button is Show Hidden Files.

The Commands Menu

Clicking the Commands button displays a menu containing the following items:

  • Parent Directory - moves up in the directory hierarchy.

  • Reload Directory - reloads the file list from disk.

  • Local Drives - displays all local drives. On Windows, this will be a list of drive letters; on Unix, the list will only contain one entry, the root directory.

  • Home Directory - displays your home directory.

  • Directory of Current Buffer - displays the directory containing the currently active buffer.

  • New File - opens an Untitled file in the current directory. The file will not actually be created on disk until it is saved.

  • New Directory - creates a new directory after prompting for the desired name.

  • Search in Directory - displays the search and replace dialog box for searching in all files in the current directory. If a file is selected, its extension becomes the file name filter for the search; otherwise, the file name filter entered in the browser is used. See the section called "Search and Replace" for details.

  • Show Hidden Files - toggles if hidden files are to be shown in the file list.

The Plugins Menu

Clicking the Plugins button displays a menu containing commands for browsing plugin file systems. For information about plugins, see Chapter 8.

The Favorites Menu

Clicking the Favorites button displays a menu showing all directories in the favorites list, along with an Add to Favorites command that adds the current directory to the favorites, and an Edit Favorites command that shows the favorites list in the file system view, allowing items to be removed by right-clicking on them and selecting Delete from the resulting popup menu.

Keyboard Shortcuts

The file system browser can be navigated from the keyboard:

  • Enter - opens the currently selected file or directory.

  • Left - goes to the current directory's parent.

  • Up - selects previous file in list.

  • Down - selects next file in list.

  • / - displays all local drives.

  • ~ - displays your home directory.

  • - - displays the directory containing the current buffer.

  • Typing the first few characters of a file's name will select that file.

The file system view, and not the Path or Filter text fields must have keyboard focus for these shortcuts to work.