As mentioned above, you can have as many buffers open at once as you like. Repeated use of
File > Open...
or
Ctrl+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, 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):
To swap to the buffer shown in brackets, just press
Return
. To swap to another buffer, type in the name of that buffer. Remember that
Tab
completion can help.
To close the buffer that is currently displayed, choose
File > Close
, or type
Ctrl+X K
.
Ctrl+X K
, you can close
any
buffer, not just the current one. Type a buffer name in the echo area, or press
Return
to close the current buffer. 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:
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
Tools > Clone
or press
Ctrl+X 2
or press 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.