Customizing preferences
Preferences of LispPad are defined on four different tabs for configuring the Lisp environment, the console with the read-eval-print loop, the built-in text editor, as well as syntax highlighting used in editor and session windows.
Environment
Every time a new session is created, a prelude is being loaded into the interpreter and executed. The
prelude is a Scheme program (a .scm
file) which is used to set up a session. The “Prelude” setting
on the environment tab can be set to two different values:
- Default loads the default/internal prelude of LispPad
- Custom loads the prelude from a custom file
It is possible to load the default/internal LispPad prelude file into an editor window by opening the “File” menu and pressing the “control” key. This will show the menu item “Open LispPad…”. Selecting it will bring up an “Open File” dialog for the folder that contains all LispPad-internal files. “Prelude.scm” is the default prelude file.
Similarly, it is possible to browse LispKit-internal files by opening the “File” menu and pressing the “option” key.
Libraries referenced from Scheme code are looked up from a set of folders. The “Libraries” setting controls how libraries are found. It can be set to two different values:
- Internal only finds library definitions automatically that come natively installed with LispPad.
- Custom allows users to define a root folder from which library definitons are looked up. This folder can be located outside of the application sandbox. If libraries are not found there, they are being looked up in the set of natively installed libraries. This mechanism allows users to override default libraries by providing alternative implementations in the custom library folder.
Since the LispPad application is sandboxed, it is difficult to read and write files from outside of the sandbox. In order to work around this limitation, LispPad allows users to define a custom Home folder. This is controlled via the “Home” setting:
- System assumes that the home folder is located within the sandbox of the application
- Custom allows users to define a custom home folder outside of the sandbox.
Console
LispPad allows users to configure the following aspects of sessions:
- Console font: The font used by the read-eval-print loop in the console of a session.
- Highlight matching parenthesis: Shows matching parenthesis when entering code in the read-eval-print loop in the console of a session.
- Require balanced parenthesis: When this option is set, the read-eval-print loop does not allow users to submit unbalanced code.
- Highlight syntax: When this option is set, syntax will be highlighted when entering code in the read-eval-print loop in the console of a session.
- History: The number of read-eval-print loop inputs remembered in a session. Users can switch between
those by using the key combinations
<option>+<cursor up>
and<option>+<cursor down>
. - Prompt: Defines the prompt used for indicating input in the read-eval-print loop.
Editor
LispPad allows users to configure the following aspects of editor windows:
- Editor font: The font used in editor windows.
- Highlight current line: When set, the line in which text is being edited is highlighted in yellow.
- Show page guide: When set, each text editor window will show a page guide at a certain text column specified by the setting “Page guide at column”.
- Show line numbers: When set, each text editor window will display line numbers at left side of the text.
- Highlight matching parenthesis: When set, matching parenthesis are highlighted while code is being edited.
- Tab size: Size of a single tab expressed in number of characters.
Syntax
LispPad allows users to configure syntax highlighting for both Scheme as well as Markdown formats. Syntax highlighting can be controlled in three different ways:
- Syntax highlighting can be switched on/off on a per-format basis
- Automatic indentation can be switched on/off on a per-format basis
- Colors that are used by the syntax highlighter can be freely configured.
There are two checkboxes with the following semantics:
- Highlight syntax: When this option is set, syntax will be highlighted while code is being edited.
- Automatic indentation: When set, code is automatically indented in each editor window.