Next: , Previous: , Up: Configuration   [Contents][Index]

5.2 Changing Menus

ne allows you to change the contents of its menus. To accomplish this task, you have to create a file named .menus in your home directory, or in ~/.ne. You can change the default name (possibly specifying a complete path) using the --menus argument (see Arguments).

Each line of a menu configuration file not starting with the ‘MENU’ or ‘ITEM’ keywords is considered a comment. You should describe the menus as in the following example:

MENU "File"
ITEM "Open...     ^O" Open
ITEM "Close         " Close
ITEM "DoIt          " Macro DoIt

In other words: a line of this form

MENU "title"

will start the definition of a new menu, having the given title. Each line of the form

ITEM "text" command

will then define a menu item, and associate the given command to it.

Any number of menus can be accommodated, but you should consider that many terminals are 80 columns wide. There is also a minor restriction on the items—their width has to be constant throughout each menu (but different menus can have different widths). Note that the text of an item, as the name of a menu, is between quotes. Whatever follows the last quote is considered the command associated to the menu.

Warning: the description of key bindings in menus (‘^O’ in the previous example) is very important for the beginner; there is no relation inside ne about what you say in the menu and how you configure the key bindings (see Key Bindings). Please do not say things in the menus that are not true in the key binding file.

The menu configuration file is parsed at startup. If something does not work, ne exits displaying an error message. If you want ne to skip the menu configuration phase (for instance, to correct the broken file), just give ne the --no-config argument. See Arguments.

Next: Virtual Extensions, Previous: Key Bindings, Up: Configuration   [Contents][Index]