8.7 Getting started with the editor

8.7.4 Using several buffers

As mentioned above, you can have as many buffers open at once as you like. Repeated use of File > Open orCtrl-X Ctrl-F just creates extra buffers.

Because the editor can only display one buffer at a time, you can use either menu commands or keyboard commands to swap between buffers.

Each item in the History > Items submenu is an open buffer. To swap to a given buffer, choose it from the menu, and it is displayed in the editor window.

Alternatively, choose View > Buffers to swap to the buffers view; see Section 8.2 on page 87 for details.

To use the keyboard, typeCtrl-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 podium in brackets, as shown below.

Select Buffer: (test.lisp): 

To swap to the buffer shown in brackets, just press Return. To swap to another buffer, type in the name of that buffer.

To close the buffer that is currently displayed, choose File > Close, or pressCtrl-X K.

Note: If you attempt to close any buffer which you have changed but not yet saved, a dialog appears, giving you the opportunity to cancel the operation.

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:

Click Yes to save the selected buffers.

Click All to save all the listed buffers.

Click No to save none of the listed buffers.

Click Cancel to cancel the operation.

This dialog is also displayed if there are any unsaved files when you exit the environment.

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 Works > Clone or pressCtrl-X 2. 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.


Common LispWorks User Guide, Liquid Common Lisp Version 5.0 - 18 OCT 1996

Generated with Harlequin WebMaker