On operating systems that support a command line, jEdit can be passed various arguments to control its behavior.
If you are using jEditLauncher to start jEdit on Windows, only file names can be specified on the command line; the parameters documented below must be set as described in Section , “Starting jEdit”.
When opening files from the command line, a line number or marker to position the caret on can be specified like so:
$ jedit MyApplet.java +line:10 $ jedit thesis.tex +marker:c |
A number of options can also be specified to control several obscure features. They are listed in the following table.
Option | Description |
---|---|
-background | Runs jEdit in background mode. In background mode, the edit server will continue listening for client connections even after all views are closed. See Chapter 1, Starting jEdit. |
-nogui | Makes jEdit not open an initial view, and instead only open one when the first client connects. Can only be used in combination with the -background switch. You can use this switch to “pre-load” jEdit when you log in to your computer, for example. |
-norestore | Disables automatic restore of previously open files on startup. This feature can also be set permanently in the Loading and Saving pane of the Utilities>Global Options dialog box; see Section , “The Global Options Dialog Box”. |
-run=script | Runs the specified BeanShell script. There can only be one of these parameters on the command line. See Section , “Running Scripts from the Command Line” for details. |
-server | Stores the server port info in the file named server inside the settings directory. |
-server=name | Stores the server port info in the file named name. File names for this parameter are relative to the settings directory. |
-noserver | Does not attempt to connect to a running edit server, and does not start one either. For information about the edit server, see Chapter 1, Starting jEdit. |
-settings=dir | Loads and saves the user-specific settings in the directory named dir, instead of the default user.home/.jedit. The directory will be created automatically if it does not exist. Has no effect when connecting to another instance via the edit server. |
-nosettings | Starts jEdit without loading user-specific settings. See Section , “The jEdit Settings Directory”. |
-noplugins | Causes jEdit to not load any plugins. See Chapter 8, Installing and Using Plugins. Has no effect when connecting to another instance via the edit server. |
-nostartupscripts | Causes jEdit to not run any startup scripts. See Section , “Startup Scripts”. Has no effect when connecting to another instance via the edit server. |
-usage | Shows a brief command line usage message without starting jEdit. This message is also shown if an invalid switch was specified. |
-version | Shows the version number without starting jEdit. |
- - | Specifies the end of the command line switches. Further parameters are treated as file names, even if they begin with a dash. Can be used to open files whose names start with a dash, and so on. |