A buffer is a temporary holding area that provides a work space for editing text. You can create a new file or edit an existing file in a buffer. A buffer becomes visible when it is associated with a window that is mapped to the screen. Buffers exist only for the duration of your editing session. When you exit from LSE, the current buffer is discarded and the contents of the buffer are stored in a file. LSE allows you to create multiple buffers. Thus, you can edit several different files in one editing session. You can create additional buffers to store portions of text that you might want to look at, but not edit, during your editing session. BUFFER ATTRIBUTES Buffers have many attributes. This section provides details on buffer attributes and properties. You can use the SHOW BUFFER command to display the characteristics of one or more buffers. Buffer Names A buffer has a name that is displayed in the status line. Buffers are usually named by the name and type of their associated input file. The GOTO FILE or GOTO BUFFER commands can create buffers. Insert/Overstrike LSE has two text entry modes: insert and overstrike. In insert mode, text gets inserted into the buffer at the cursor position. Text to the right of the cursor gets moved. In overstrike mode, text typed at the cursor replaces text that is currently under the cursor. When you start an editing session, the buffer is automatically placed in insert mode. To change the text entry modes, you use the CHANGE TEXT_ENTRY_MODE command. Forward/Reverse LSE maintains a current direction for each buffer. The current direction is displayed in the status line. This direction is used for SEARCH operations and the GOTO and ERASE commands. When you start an editing session, the buffer direction is set to forward. To set the current direction to forward, you use the SET FORWARD command. To set the current direction to reverse, you use the SET REVERSE command. Alternatively, you can use the CHANGE DIRECTION command to change the current direction. Input/Output Buffers may have an associated input or output file. An input file is a file that is read into a buffer when a buffer is created. An output file indicates where LSE will write a buffer. This is usually a new version of an input file. You can change the output file name with the SET OUTPUT_FILE command. The GOTO FILE command creates a buffer and reads a file into it. Read/Write Buffers have either the read-only or write attribute. The read-only attribute indicates that the contents of the buffer will not be written to a file on exit. The write attribute indicates that the buffer will be written to a file on exit. Usually, a file is associated with a buffer by the GOTO FILE command, which creates a buffer and fills it with the contents of a file. When the buffer is written, it is written to a new version of the file. If no file is associated with a buffer that has the write attribute, LSE prompts for a file specification on exit. Note that a buffer is written only if its contents have been modified. Modifiable/Unmodifiable Buffers are either modifiable or unmodifiable. Unmodifiable buffers protect the contents of a given buffer. You cannot change an unmodifiable buffer. The GOTO FILE/READ_ONLY and GOTO SOURCE/READ_ONLY commands create unmodifiable buffers. If you want to modify an unmodifiable buffer, you must issue the SET MODIFY or SET WRITE command. There are some relationships between the READ-ONLY/WRITE buffer attributes and the UNMODIFIABLE/MODIFIABLE buffer attributes. Given these attributes, a buffer may be in one of four possible states. The following list describes these states and explains how to create these states for a buffer. o MODIFIABLE - WRITE The GOTO FILE/WRITE, GOTO SOURCE/WRITE, SET WRITE, and RESERVE commands set buffers to this state. It is also the default for the file specified in the LSEDIT command line. The buffer may be modified and will be written on exit if it has been modified. o MODIFIABLE - READ-ONLY This is the default for the GOTO BUFFER/CREATE command that is used to create a "scratch" buffer. The buffer may be modified, but it will not be written on exit. o UNMODIFIABLE - READ-ONLY The GOTO FILE/READ_ONLY and GOTO SOURCE/READ_ONLY commands create buffers in this state. The buffer cannot be modified. If you issue a SET MODIFY command on this buffer and modify the contents, LSE will not write the contents on exit unless you also issue the SET WRITE command for the buffer. o UNMODIFIABLE - WRITE A buffer can be set to this state by a user who has completed a set of changes to a buffer in the MODIFIABLE - WRITE state and then issued a SET NOMODIFY command for the buffer to protect the buffer from accidental change for the remainder of the editing session. LSE will write the file on exit if it has been changed during the editing session. System Buffers Some buffers are used by LSE for special purposes. These are called system buffers. Unlike user buffers, system buffers do not correspond to files. You can edit a system buffer like any other buffer, but you should avoid changing its contents. By convention, system buffer names start with a dollar sign ($). The most frequently used system buffers are $HELP, $MESSAGES, $REVIEW, and $SHOW. System buffers are not displayed by the SHOW BUFFER command unless you use the /SYSTEM_BUFFERS qualifier. Languages Buffers may have a language associated with them. This determines which language is used for the language-sensitive features. The file type of your current buffer determines the language LSE uses. Thus, you can move between different languages in different buffers, and LSE will provide the interfaces to the appropriate compilers. The SET LANGUAGE command associates a language with a buffer. Current Indentation and Tab Settings LSE maintains two settings to control the action of the tab key: current indentation level and tab increment. When you are at the left margin, the tab key indents to the current indentation level. If you are not at the left margin, the tab key takes you to the next tab column based on the tab increment setting. The SET INDENTATION command sets the current indentation level; the SET TAB_INCREMENT command sets the size of the tab increment. Key Bindings Buffer commands, along with default key bindings are listed under subtopic "Buffer_Commands".
1 – Buffer Commands
LSE provides the following commands for manipulating buffers: CHANGE DIRECTION Alters the direction of the current buffer. This command is bound to Key F11 (PF3 in EVE VT100). CHANGE TEXT_ENTRY_MODE Alters the text entry mode of the current buffer between insert and overstrike. This command is bound to Key F14 (ENTER in EVE VT100). COMPILE compiles the source code in the buffers. CUT [/BUFFER=name] deletes and moves text in the select range to the paste or specified buffer. DO [/BUFFER=name] directs LSE to execute LSE commands or VAXTPU program statements from the current or specified buffer. EXIT terminates an editing session and saves all modified buffers. EXTEND compiles one or more VAXTPU procedures to extend LSE. GOTO FILE file-spec moves to the buffer containing the specified file or creates a new buffer for the file. GOTO BUFFER name moves the cursor to the last position held in the specified buffer. GOTO SOURCE moves to the source buffer related to the diagnostic or query item. This command is bound to CTRL/G. PASTE [/BUFFER=name] copies the content of the paste or specified buffer to the current buffer. QUIT terminates an editing session without saving any modified buffers. READ file-spec [buffer] inputs a specified file to the current or specified buffer. SET AUTO_ERASE enables automatic erasing of placeholders. SET FORWARD [/BUFFER=name] sets the direction of the current or specified buffer forward. This command is bound to Keypad 4 (no binding for EVE VT100). SET INDENTATION [/BUFFER=name] changes the indentation level for the current or specified buffer. SET INSERT [/BUFFER=name] sets the text entry mode of the current or specified buffer to insert mode. SET LANGUAGE [/BUFFER=name] changes the language associated with the current or specified buffer. SET LEFT_MARGIN [/BUFFER=name] specifies the left margin for the buffer for FILL and ENTER space commands. SET MODIFY [/BUFFER=name] sets buffer status to modifiable. SET NOAUTO_ERASE disables automatic erasing of placeholders. SET NOMODIFY sets buffer to unmodifiable. SET NOWRAP disables wrapping in the indicated buffer. SET OUTPUT_FILE [/BUFFER=name] changes the output file associated with the current or the specified buffer. SET OVERSTRIKE [/BUFFER=name] sets the text entry of the current or specified buffer to overstrike mode. SET REVERSE [/BUFFER=name] sets the direction of the current or specified buffer to reverse. This command is bound to Keypad 5 (no binding for EVE VT100). SET RIGHT_MARGIN [/BUFFER=name] specifies the right margin for the buffer for FILL and ENTER space commands. SET TAB_INCREMENT [/BUFFER=name] specifies the number of columns between tab stops for the current or specified buffer. SET WRAP enables wrapping in the indicated buffer. SET WRITE [/BUFFER=name] specifies that following a COMPILE command or an exit from LSE, the specified buffer will be written to a file. SHOW BUFFER [name | *] displays the characteristics of a specified or default buffer. WRITE [/BUFFER=name] [file] outputs the content of the current or specified buffer to to a specified file.