4.3 Getting started with the editor
The editor can only display one buffer at a time, but you can have several buffers open it. At any time, you can swap the currently displayed buffer for another one.
In the editor, each item in the Buffers menu is an open buffer. Simply choose the buffer you want to swap to and it will be displayed in the window.
If you want to use the keyboard, type C-x b
. You are prompted for the name of the buffer you wish to swap to. By default, the buffer you last displayed is chosen for you, and is listed in the echo area in brackets, as shown below.
Select Buffer: (TEST.LSP):If you want to swap to the default buffer, just press Return. If you want to swap to another buffer, enter the name of that buffer.
If you want to close the buffer that is currently displayed, choose File > Close, or press C-x k
.
C-x k
, you are prompted for a buffer name in the echo area. If you just press Return, the current buffer is closed.Note: If you attempt to close any buffer which you have changed but not yet saved, a dialog box appears which lets you cancel the operation if you want to.
C-x s
. A dialog box appears listing every buffer that has been modified. To the left of each buffer name is check box, which is selected by default. De-select any buffers that you do not want to save, and click OK. All the selected buffers are savedNote: This dialog box is also displayed when you exit FreeLisp, if there are any unsaved files.
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 might have several buffers open, and you might 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 this by creating a new editor window. Press C-x 2
(or use Works > Clone). This creates a copy of your original editor. Notice that this new editor displays the same buffer as the original one.
1. Create two editor windows by pressing C-x 2
Make sure both windows are visible on your screen.
2. Type something in the newly created window
What you typed automatically appears in the other window, even though it is not the active window.
Generated with Harlequin WebMaker