Editing code

LispPad allows you to write Scheme code directly using the built-in code editor. There are two different types of code documents that can be edited: programs (usually with file name suffix .scm) and _libraries (with suffix .sld).

Programs

Programs consist of executable code. They can be loaded into a session and executed with the “Session > Load File…” menu item, or the corresponding button in the session toolbar. Alternatively, the code editor window allows users to load the current code into the last active session via the “Session > Run” menu item.

Libraries

Libraries define reusable modules of Scheme definitions. Libraries import functionality from other libraries and export a named set of definitions. Just like programs, libraries can be loaded into a session, but all this does is to make the library available for import. As an example, (import (lispkit datatype)) will import the library (lispkit datatype). The library definition for (lispkit datatype) needs to be stored in a file with path name lispkit/datatype.sld within a libraries directory defined in the LispPad preferences.

Editor window

The editor window typically looks like this: LispPad editor window The buttons in the toolbar have the following functionality:

Via LispPad’s preferences, it is possible to customize editor windows in the following way:

All settings are applicable to all editor windows, but changes to the settings will only take effect for new windows, or when the application is restarted or windows reopened.