Opening Files

There are various ways to open a file for editing. File>Open File (keyboard equivalent: Control-O) pops up a dialog box allowing you to browse and search the file system and select a file to open. File>Open Path (keyboard equivalent: Control-E Control-O) pops up up a dialog box allowing you to either type in a path name or URL. Recently edited files are listed in the File>Recent Files menu; selecting one will open it. Similarly, the File>Current Directory menu lists all files in the current buffer's directory.

Figure 3-3. The Open File dialog box

All open buffers are listed in the Buffers menu; selecting one will display that buffer in the current view. The tabs that run along the top of the text area can also be used to switch between buffers. If you don't like the tabs, they can be disabled in the Utilities>Global Options dialog box; see the section called The Global Options Dialog Box in Chapter 8 for details.

Files that you do not have write access to are automatically opened read only. Files can also be forced to open read only from the command line by specifying the -readonly option.

jEdit doesn't actually change a file on disk until you save it. If there are unsaved changes in a buffer, "(modified)" will be displayed in the rightmost section of the status bar and Buffers menu.

Searching for Files

The Open File dialog box has a widget for quickly searching the filesystem for files with a specific name and/or modification time. The search is performed from the currently viewed directory.

File names to search for can be specified in the Name tab. The options in the combo box left of the text field allow you to specify how file names will be matched. Selecting "is" will only match files whose name is exactly that specified in the text field. "Contains", "starts with", "ends with" should be self-explanatory. "Pattern" will treat the contents of the text field as a glob pattern (see Appendix D) and match file names against that. If "Ignore Case" is selected, all file name matching will be case-insensitive.

The Date tab allows you to specify a start and end date, inclusive, that matched files's modification time must be in. The "big bang" and "big crunch" options allow you to specify an unbounded time range.

Clicking Start will begin the search. While a search is in progress, it can be interrupted by clicking Stop. Found files will be listed in the Results tab; clicking on one will select it in the file chooser.