All Manuals > LispWorks IDE User Guide > 3 Common Features

3.2 Setting preferences

Choose Tools > Preferences... from the podium or Works > Tools > Preferences... or click to raise the Preferences dialog. This dialog is used to specify:

The tool-specific options are described in the chapter relevant to each tool.

The remainder of this section describes the general environment options. To see these, ensure that Environment is selected in the list on the left side of the Preferences dialog, and select the General, Emulation, Styles, and File Encodings tabs.

In all cases your setting is preserved for future use after you click OK to close the Preferences dialog.

3.2.1 General options

The first tab under Environment contains the General options.

The Preferences dialog

3.2.1.1 The window options

Reuse all tools controls whether LispWorks uses an existing tool rather than starting up a new copy. For example if Reuse all tools is checked, if an editor is already open, choosing File > Open and selecting a new file causes the file to be opened in the existing editor.

Use separate Editor windows for each file controls whether LispWorks will open a separate Editor window for each file (or editor buffer) that you have in memory. In addition, when Use separate Editor windows for each file is checked, closing an Editor window will remove the underlying editor buffer from memory, possibly asking if you want to save it. The default setting is unchecked.

Note: for information about Editor windows, editor buffers and files, see 12.3 Displaying and swapping between buffers.

Check Use recent directory for opening files to make operations such as File > Open use the directory of the file most recently edited as the default directory in the file dialog. Deselect this option to make the dialog's default directory be the current working directory. Note that this option does not affect the Editor tool, for which the file dialog always uses the directory of the currently visible file as the default directory.

Check Use quality drawing to make the LispWorks IDE use quality (anti-aliased) drawing for editor and graph panes. This is the default setting.

3.2.1.2 Controlling completion behavior

In-place completion is enabled by default in the IDE. If you prefer the modal dialog style of completion familiar to users of LispWorks 5.0 and previous versions, deselect the Use in-place completion option.

When using in-place completion to complete a filename, by default you must always select an item from the in-place completion window. You can accelerate this interaction by checking the option Auto-insert on single file completion. Then, if there is just one possible completion, it is automatically selected and appended to your input.

3.2.1.3 Quitting the environment

Choose Works > Exit > LispWorks... to exit LispWorks.

You can control whether LispWorks prompts for confirmation before exiting, using Works > Tools > Preferences..., and then select Environment in the list on the left side of the Preferences dialog. The Confirm Before Exiting preference has these meanings:

Never
LispWorks exits immediately.
When modified buffers

If there are modified editor buffers, a dialog asks you whether these should be saved before exiting.

Always
A dialog asks you to confirm whether LispWorks should exit.
3.2.1.4 Automatic filters on dialogs

The option Add a filter to dialog lists longer than: affects modal dialogs containing long lists. When the list is longer than the value of this option, the list has a filter, which you can use as described in 3.14.3.1 Filtering modal dialog completion.

3.2.1.5 Automatic use of Find Definitions view

The option Use Find Definitions list for more items than: affects the behavior of source location commands such as the editor commands Find Source and Find Source for Dspec, and the menu command Expression > Find Source. When the number of source location results exceeds the value of this option, then the results are immediately displayed in the Find Definitions view of an Editor tool. This is particularly useful when you need to locate the definition of a particular CLOS method from the generic function name.

The Find Definitions view is described in 12.6 Finding definitions.

3.2.1.6 Initialization file

By default LispWorks looks for a file .lispworks to be loaded automatically when LispWorks is started. You should create an initialization file and add to it Lisp code to initialize the LispWorks image to suit your needs.

The Preferences dialog can be used to specify a different initialization file, in the Initialization File area. You can either enter the path and filename directly into the text input box, or use the button to display a file selection dialog. Clicking on undoes any alterations entered.

Note: it is up to each user to create and maintain their own personal initialization file. A sample personal initialization file is supplied with LispWorks - see the file lib/8-0-0-0/config/a-dot-lispworks.lisp in the LispWorks distribution.

3.2.2 Configuring the editor emulation

The second tab under Environment contains the Emulation options.

The Emulation tab of the Environment Preferences

Here you can configure the editor to behave according to one of two pre-defined editor input styles (emulations) which determine how keyboard input is processed and other properties such as the shape of the input cursor. You can also set the cursor blink rate.

The choice of emulation affects the Editor and other LispWorks tools containing editors such as the Output Browser, Stepper and Profiler.

3.2.2.1 Choosing the key input style

The Editor and other tools using capi:editor-pane offer two key input styles: Emacs emulation or KDE/Gnome emulation. By default, Emacs emulation is used. To choose an emulation, select Environment > Emulation in the Preferences dialog as shown in 3.2.2 Configuring the editor emulation and select one of the Editor keys are like... options.

Note: In this and other manuals, the Emacs keys are generally given. For help with finding keys for editor commands, choose Help > Editing > Command to Key. Also see the files config/key-binds.lisp and config/msw-key-binds.lisp which contain the forms defining the keys for each input style.

3.2.2.2 Specifying a Meta key in LispWorks for Macintosh

This section only applies to LispWorks for Macintosh.

3.2.2.3 Effect of the specified Meta key

This section only applies to LispWorks for Windows and LispWorks for Macintosh.

3.2.2.4 Setting the cursor blink rate

By default the editor cursor blinks on and off at the usual rate for your computer.

To change the blink rate, select Specify in the Cursor Blink Rate area. Either scroll to choose the rate in Milliseconds, or enter an integer between 100 and 2000.

To stop the editor cursor from blinking, select None in the Cursor Blink Rate area.

3.2.3 Setting the editor font, color and other style attributes

The third tab under Environment contains the Styles options.

The Styles tab of the Environment Preferences

By default the editor uses a system default font. You can choose an alternative font and see a sample of it displayed in the Editor Font area. Click in the Sample: area to raise a font chooser. After you select the font, the text "Click here to choose the font" is displayed in your selected font.

To make the LispWorks editor actually use your alternative font, select Override the system default font.

This specifies the font used in Editor and Listener windows and all other tools based on the editor, such as the Shell, Stepper and Profiler tools.

If you deselect Override the system default font the system remembers your choice of alternative font, but does not actually use it for display.

3.2.3.1 Changing the main colors of editor panes

You can modify the background and foreground of the Editor and Listener windows, and all other tools based on the editor, using the Main Colors frame. Note, however, that this will override any customization done in the underlying window system, for example the resources in GTK+, which or may not be what you want.

First select the kind of editor that you want to modify in the Pane Kind list. Alternatively select Default to specify default background and foreground, which apply to any editor of a kind for which the corresponding value is not set.

The specific kinds are:

Editor
The main panes in the Editor tool, and other panes which are also just used for editing, for example the Code To Profile tab in the Profiler and Source: in the Stepper.
Listener
The Listener tool and other listener panes, including in the Debugger, the Inspector and the Stepper.
Output
Any pane that is used for output, including the pane in the Output tab of the Editor, Listener and System Browser, and the output panes in the Tracer and Application Builder.
Shell
The Shell tool.
Echo

Echo areas on all tools.

The colors apply when the echo area is active. If Change the echo area color when not active is checked, the echo area reverts to the interface colors when it is inactive.

For each kind of pane, check Use color: alongside Background or Foreground to specify the background and foreground colors. If Use color: is unchecked, the value is not specified, and a large cross appears in the color area on the right. If Use color: is checked, then the color is set and the color area on the right shows it. Click in the color area to change the color using a Color chooser that is raised.

When the LispWorks IDE makes an editor pane, it uses the foreground and background for this kind of pane if they are specified. If either the foreground or background is not specified (that is, Use color: is unchecked), then it uses the color specified for the Default pane kind if that is set. Otherwise it uses the default of the window system.

The Change the echo area color when not active checkbox controls whether an echo area changes its colors when it is not active. When it is checked and an echo area become inactive, the echo area changes its foreground and background to the colors of the tool. In other cases, echo areas use the colors set under Echo in the Main Colors box of the Preferences dialog, or in the window system (such as in the GTK+ resources).

3.2.3.2 Setting the text style attributes

By default the LispWorks IDE uses a variety of text styles to:

Note: The last two of these features operate only in Lisp mode.

To change the attributes of one or more text styles, first select Environment > Styles in the Preferences dialog as shown in 3.2.3 Setting the editor font, color and other style attributes.

Then, to make Common Lisp symbols appear with red foreground rather than the default purple for example, first select Lisp Keyword in the Style Name list. Then select Specified alongside Foreground and double-click on the color area to the right. In the Color chooser that appears, choose the new color and click OK. Now click OK on the Preferences dialog and see the change in the way your Lisp code is displayed. You may need to force the editor window to redisplay, for example by scrolling, to see the change take effect.

For each named style, the Foreground and Background each have exactly one of the following values:

None
No special formatting.
Default
Platform-standard highlighting, as for selected text.
Specified
The color specified is used.
Modified
The system generates a color which is usable for highlighting.

A large cross appears in the Foreground (Background) color area when None, Modified or Default is selected. This indicates that the color is not used for the Foreground (Background).

If you wish to turn off the highlighting of interactive input in the Listener and Shell tools, first select Interactive Input in the Style Name list. Then uncheck all the attributes and click OK.

To restore all styles to those in LispWorks as shipped, click Restore Defaults.

Note: the foreground and background colors of windows are set via the system, not in LispWorks. To alter these colors on GTK+ or Motif, see "Matching resources for GTK+ and X11/Motif" in the CAPI User Guide and Reference Manual and specify resources for the application class Lispworks.

The text styles used in syntax coloring have these meanings and default appearance:

Syntax styles
Style NameUseDefault appearance

Region Highlight

The active region

Native highlight

Show Point

Matching parentheses

:green background

Interactive Input

Input in a Listener or Shell

Bold

Marked Object

20.10.4 Highlighting of results

Underlined

Highlight

Editor help such as Describe Bindings

Bold

Completion

Dynamic and in-place completions. Transient.

Modified background

Search Match

The matching text during an incremental search (as invoked by Ctrl+S)

Inverse

Line Wrap Marker

Displays the editor's line wrap marker, where a line is wrapped or truncated

:purple foreground, modified background

Lisp Function Name

Name in defun, defmacro, defmethod and defgeneric forms

:blue foreground

Lisp Comment

Comments and feature expressions

:firebrick foreground

Lisp Type

Name in deftype or other def... form, or lambda list keyword such as &optional

:forestgreen foreground

Lisp Variable Name

Name in defvar or defparameter forms

:darkgoldenrod foreground

Lisp String

A string literal

:rosybrown foreground

Lisp Keyword

defun, defmacro or other definer named def...

:purple foreground

Lisp Builtin

A keyword symbol

:orchid foreground

Arglist Highlight

The current argument in a Function Arglist Displayer window

Inverse

Hidden Comment String

Replacement string for hidden comments in folded definitions.

:gray background

3.2.3.3 Controlling parenthesis coloring

You can control whether the editor colors parentheses in Lisp code. By default, pairs of matching parens are displayed in the same color, with a different color for forms at different depths. You can switch off this coloring by deselecting the option Color parenthesis in the Styles tab of the Environment preferences.

3.2.4 Setting the default encodings

The fourth tab under Environment contains the File Encodings options.

The Editor has defaults for the encodings used when opening and saving files. For many users these defaults will suffice. If you need to change either, select the Environment > File Encodings tab of the Preferences dialog.

The File Encodings tab of the Preferences dialog

For example, to make the Editor save Carriage Return line-terminated files by default, select CR in the Line Termination Options under Output.


LispWorks IDE User Guide (Unix version) - 01 Dec 2021 19:37:02