Switching between buffers

First one can press the Alternate key and one of the number keys on the main key pad. This selects the buffer with the corresponding number as the current buffer. When you switch from one buffer to another, if the new buffer has previously been used, it will be displayed on the screen exactly as it was left when last viewed. That is to say that the line numbers displayed will be exactly the same and the position of the cursor will be in the same position as before. The change buffer command can also be executed via the command line as is the case with all key combinations involving the alternate key. In that case one should enter the command line by pressing <Esc> and type the command Alt-# in which the # represents a single digit and a <return>. The digit indicates then which buffer is selected. This command is particularly useful for working with macro's and stream editing. It can also be typed as `alt-4' if one likes to go to buffer 4.

A second way to switch between buffers is by the name of the buffer via the `quote' command of the command line. To give this command, first press <Esc> to enter the command line. Then type a single quote followed by some of the first few characters of the name of the desired buffer. The editor will search forward from the current buffer for a buffer whose name begins with the same characters entered after the quote. The search is circularly forward and when no match occurs, no change of buffer is made. Depending on the setting of the fourth status character (S/N for sensitive or nonsensitive) this buffer search is either case sensitive or case nonsensitive. It is not necessary to type a closing quote after the string in this search command.

In addition to the above ways there are two other commands that can result in a flipping between buffers. The first involves tags. A tag is a mark that is buffer independent. If a tag has been placed in one buffer and the user goes to another buffer the action to find the placed tag will result in a tranfer back to the original buffer. For more about tags one should consult the section on tags p. [*]. The other way involves the use of Alt-F when the screen is split in two regions. The Alt-F flips the cursor between the two different buffers that are displayed. There is more about this in the chapter on screen control p. [*].

The name of the file being edited in a buffer usually determines the name of the buffer. When the editor is entered with a command tail that contains one or more file names the corresponding buffers in which these files are placed inherit the names of these files. Even if these files don't exist yet, the buffers will be named accordingly and stedi will assume that they are new files to be created. If no files are specified or some buffers are not yet filled at startup then they are not yet given a name. Whenever a buffer has no name, the first read operation to this buffer or the first write operation from this buffer will determine its name. When a buffer is cleared, its name is also removed.

The current buffer can be cleared with the shift-F9 key. If the work in the buffer has been altered and the `view only' flag is not active, there will be a warning that the buffer is not saved yet and the clear operation will have to be confirmed. The ninth status character in the status bar indicates whether or not a file has been altered. If this character is a blank, then no changes have been made and if it is a little circle, the file has been changed since last saved.

If the `view only' flag is set, the seventh status character in the status bar will be a `V'. A buffer will be given this status when the first file that is read into it is a file that is marked read-only. The user can also switch to a `view only' status at any moment with the Alt-V key command. To switch from this status to the normal mode so that the contents of the buffer can be written to disk, one may use the Ctrl-V command.

Each buffer has a number of settings assigned to it. These settings may therefore be different for each buffer. When one of these settings is changed in one buffer, this doesn't affect the others. When a buffer is cleared, its settings are lost and new settings are taken from the default buffer (see the chapter on default settings). The buffer dependent settings are :