|
Customisation |
This chapter is devided into several sections:
The preferences are:
Preferences are saved as soon as they are defined and retained for future sessions. They are stored in a file named ".red-prefs" in the user's home directory.
- Show toolbar
- Toggles the display of the toolbar.
- Show cursor line number
- Togglespermanent line number display at the bottom of the screen.
- Beep with warnings
- Determines whether Red beeps when displaying a warning.
- Make backup when saving
- When on, Red automatically creates a backup file when an existing file is changed. The backup file name has a .~ suffix.
- Always end file with Newline character
- When on, Red adds a Newline character (normally inserted by the Return or Enter key) at the end of a file if the file does not end in a Newline. This helps with some applications which expect all lines (including the last one) to be terminated with a Newline.
- Automatically convert DOS files while loading
- When on, and a file is loaded that is found to be in DOS format (lines are ended with CR/LF rather than the Unix standard LF only), the CR is automatically stripped from the file.
- Comment start
- String to be inserted as a start of a comment when using the function comment.
- Comment end
- String to be inserted as the end of a comment when using the function comment.
- Quote string
- When you include a file into the current buffer (using the insert-file function from the Edit menu), you have the option of "quoting" that file. If a file is quoted, the quote string defined here is used as a prefix to every line.
To view or change the key bindings, call key-bindings (by default on Alt-k and in the Options menu). This opens a dialog.
The key bindings are stored in a file named ".red-key-bindings" in the user's
home directory. Removing this file causes Red to revert to default bindings.
A set of key bindings can be given to another user by copying this file into
the user's home directory.
3. Changing the Toolbar
Changing the toolbar is not yet implemented.
4. Changing Fonts
Changing fonts interactively is not yet implemented.
5. Changing Colours
Changing colours is not yet implemented.
6. X Resources
Although it might be confusing, the class name to use for changing some Red
resources is Blue. This is, because Red is part of the
Blue programming environment,
and resources
for that environment are for the resource class Blue. Some
resources are for the class Red.
Red's X Resources are stored in a file called "Blue" which is typically located in /usr/lib/X11/app-defaults. You can change the settings there or add the following lines to your X resource database.
Examples:
Blue.editFont: lucidasanstypewriter-12The font must be a fixed character width font.
Blue.editFont: lucidasanstypewriter-14
Blue.editFont: lucidasanstypewriter-bold-12
Blue.editFont: lucidasanstypewriter-bold-14
Blue.editFont: 8x13
Blue.editFont: 8x13bold
Blue.editFont: 9x15
Example:
Blue.infoFont: *menu*12*
Blue.printCmd: /usr/ucb/lpr -h -P$