This section deals with some of the most basic commands available in the Editor. It describes how to perform simple file management, how to move around a buffer, and tells you about some other more general commands available.
Use file extensions
.lsp for Common Lisp files. The Editor recognizes these extensions and places the buffer in Lisp mode. Lisp mode provides special features for use in Lisp editing, as described in Lisp mode.
You can create a new Lisp buffer by choosing File > New or clicking on . The new file is automatically in Lisp mode, and the buffer is called "Unnamed". When you try to save this buffer, the Editor prompts you for a filename.
To save a file, choose File > Save or click on . If the file has not been saved before (that is, if you created the file by choosing File > New and this is the first time you have saved the file), you are prompted for a directory and a filename.
Choose File > Revert to Saved to revert back to the last saved version of the file. This replaces the contents of the current buffer with the version of that file which was last saved on disk. This command is useful if you make a number of experimental changes which you want to abandon.
To move directly to any point in the buffer, position the pointer and click the left mouse button. If necessary, use the scroll bars to reveal sections of the buffer which are not visible in the window.
The editor provides a sophisticated range of commands for cutting text which are described in Cutting, copying and pasting using the kill ring. However, the two basic commands for deleting text which you should remember are as follows:
Deletekey if available.
You can insert text into a buffer by typing characters, or by pasting (see Cutting, copying and pasting using the kill ring) or by inserting the contents of a file.
By default, when typing in a buffer, any characters to the right of the cursor are moved further to the right. If you wish to overwrite these characters, rather than preserve them, press the
Insert key. To return to the default behavior, just press the
Insert key once more.
To insert the contents of one file into another, choose File > Insert... . A dialog appears so that you can choose a file to insert, and this is then inserted into the current buffer, starting from the current position of the cursor.
Alternatively, click on the Buffers tab to swap to the Buffers view; see Displaying and swapping between buffers for details.
To use the keyboard, type
Ctrl+X B. You are prompted for the name of the buffer you wish to display. The last buffer you displayed is chosen by default, and is listed in the echo area in brackets, as shown below.
Select Buffer: (test.lisp):
Ctrl+X K, you can close any buffer, not just the current one. Type a buffer name in the echo area, or press
Returnto close the current buffer.
To save all the buffers in the Editor, choose File > Save All... . A dialog appears which lists each modified buffer. By default, each buffer is selected, indicating that it is to be saved. If there are any buffers that you do not want to save, deselect them by clicking on them. The dialog has four buttons, as follows:
Sometimes you may find that being able to display only one buffer in the window simply does not give you enough flexibility. For instance, you may have several buffers open, and you may want to look at two different buffers at once. Or you may have a very large buffer, and want to look at the beginning and end of it at the same time.
You can do any of these by creating a new Editor window. Choose
Tools > Clone
Ctrl+X 2 or click the
button. This creates a copy of your original Editor. The new Editor displays the same buffer as the original one.
Changes made to a buffer are automatically reflected across all editor windows - the buffer may be displayed in two different windows, but there is still only one buffer. This means that it is impossible to save two different versions of the same file on disk.
LispWorks IDE User Guide (Windows version) - 13 Sep 2017