Next: , Up: Reference   [Contents][Index]

3.1 Arguments

The main arguments you can give to ne are the names of files you want to edit. They will be loaded into separate documents. If you specify --help anywhere on the command line, a simple help text describing ne’s arguments will be printed.

The +N option causes ne to advance to the Nth line of the next document loaded. This option is fairly common among editors and text display programs like vi and less. The N itself is optional. Without it, a bare + on the command line causes ne to advance to the last line of the first document. You can specify a line and column as +N,M. Any non-digit can be used to separate the N from the M. As it only affects the next document loaded, it can appear multiple times on the command line.

The --binary option causes ne to load the next document in binary mode. Binary mode treats the normal line termination characters as any other character and only breaks lines on NULL characters. Like +N,M, --binary only affects the next document loaded, and it can appear multiple times on the command line. See Binary.

The --no-config option skips the reading of the key bindings and menu configuration files (see Configuration). This is essential if you are experimenting with a new configuration and you make mistakes in it.

The --prefs extension option makes ne load a specified set of automatic preferences, that is, those associated with the provided extension, instead of the default ones, before loading the first file. It can be useful, for instance, when piping a file into ne or when reading from named pipes, as in those cases there is no file extension from which ne can guess the correct preferences. Note that preferences are cloned from the current document when a new document is created, so if you open a number of files without extension this option will propagate to all of them.

The --macro filename option specifies the name of a macro that will be started just after all documents have been loaded. A typical macro would move the cursor to a certain line.

The --keys filename option and the --menus filename option specify a name different from the default one (.keys and .menus, respectively) for the key bindings and the menu configuration files. Note that ne searches for these files first in the current directory, and then in your ~/.ne directory.

The --ansi and the --no-ansi options manage ne’s built-in ANSI sequences. Usually ne tries to retrieve from your system some information that is necessary to handle your terminal. If for some reason this is impossible, you can ask ne to use a built-in set of sequences that will work on many terminals using the --ansi option (to be true, ne can be even compiled so that it uses directly the built-in set, but you need not know this). If you want to be sure (usually for debugging purposes) that ne is not using the built-in set, you can specify --no-ansi.

The --no-syntax option disables ne’s normal syntax highlighting capability. For most editing situations, this would be unnecessary, but for extremely large files it may be helpful. Syntax highlighting incurs small memory usage and processor overhead penalties for each line of text. The --no-syntax option eliminates that overhead. Note that files longer than ten million bytes will have syntax highlighting disabled by default, but it is possible to re-enable it. See Syntax Highlighting.

The --utf8 and --no-utf8 options can be used to force or inhibit UTF-8 I/O, overriding the choice imposed by the system locale. Note, however, that in general it is more advisable to set the LANG environment variable to a locale supporting UTF-8 (you can usually see the locale list with locale -a). See UTF-8 Support.

If you need to open a file whose name starts with ‘--’, you can put ‘--’ before the filename, which will skip command recognition for the next word.

Finally, ne has a global directory where the system administrator can store macros, default preferences, and syntax definitions for all users of the system. The location of this directory is defined when ne is built, but you can override it by creating and exporting the NE_GLOBAL_DIR environment variable prior to invoking ne. If you load no files when you start ne, or if you invoke the About command, it will display a splash screen. The last line on that screen shows the global directory ne is using, if it exists, or an error message otherwise.

Next: , Up: Reference   [Contents][Index]