SED - Cursor Movement and Search Functions
Start line (Ctrl-A or Home)
Moves the cursor to the start of the current line (column 1).
End line (Ctrl-E or End)
Moves the cursor to the position following the last character in the current line.
Moves to the start of line 1.
Bottom (Esc- >)
Moves to the start of the line immediately after the last line in the record.
Down line (Ctrl-N or Cursor Down)
Moves the cursor vertically down one line. If this position is beyond the end of the data in the new line, the cursor is displayed immediately to the right of the final character. The editor remembers the column position from which the cursor was moved so that a further vertical movement will continue to place the cursor at the lesser of its original column position and the end of the current line. The default behaviour if the cursor is on the bottom line of the displayed data is to scroll down such that the cursor line is in the centre of the displayed data. If the SCROLL1 option is set in the &SED.OPTIONS& record, the screen scrolls by just one line.
Up line (Ctrl-P or Ctrl-Z or Cursor Up)
Moves the cursor vertically up one line. The same process is used for determining the column position as for the down line operation described above.The default behaviour if the cursor is on the top line of the displayed data is to scroll up such that the cursor line is in the centre of the displayed data. If the SCROLL1 option is set in the &SED.OPTIONS& record, the screen scrolls by just one line.
Forward char (Ctrl-F or Cursor Right)
Moves the cursor right. Moving beyond the end of a line positions the cursor at the start of the following line.
Back char (Ctrl-B or Cursor Left)
Moves the cursor left. Moving beyond the start of a line positions the cursor at the end of the previous line.
Forward word (Esc-F)
Moves the cursor to the first character after the next word. A word is defined as a continuous sequence of letters or digits.
Back word (Esc-B)
Moves the cursor to the first character of the previous word. A word is defined as a continuous sequence of letters or digits.
Forward screen (Ctrl-V or Page Down)
Moves the cursor down by one screen or to the end of the buffer.
Back screen (Esc-V or Page Up)
Moves the cursor up by one screen or to the start of the buffer.
Goto line (Esc-G)
Moves the cursor to the line number specified by the repeat counter. If no count has been entered, a prompt for the line number is issued.
Tab (Tab or Ctrl-I)
Advances the cursor to the next horizontal tabulation position (columns 11, 21, 31, etc. by default. See the TABS command). If this is beyond the end of the data in the current line, spaces are inserted to extend the line to the required position. The tab function does not insert a tab character. Use the quote character prefix to do this.
Forward search (Ctrl-S or Esc-S)
The forward search function prompts for a search string and advances to the next occurrence of this string within the record. The prompt defaults to the same string as the previous search function (if any). Searches may be performed in any of four modes:
The default search mode may changed during initialisation or by commands entered at the SED command prompt. Use of the up line and down line functions whilst entering the search string can also be used to change the mode except when collecting functions for a macro.
When a search is included in a macro, the prompt for the search string only occurs when collecting the macro. Subsequent executions use the same search string. Multiple search functions in a macro may have different search strings.
Reverse search (Ctrl-R or Esc-R)
The reverse search function prompts for a search string and moves backwards to the previous occurrence of this string within the record. The prompt defaults to the same string as the previous search function (if any). Search modes are as described above.
View (Ctrl-X V)
The view function prompts for a search string displays a new buffer containing all lines beyond the current cursor position that include this string, showing the line number and the text of the line with leading spaces removed. Use any of the standard SED cursor movement functions to position on a line and press the return key to go to this line of the full record text. The view buffer is automatically deleted at any editing function that invalidates its content (e.g. entering new text).
Nudge down (Ctrl-X Ctrl-N)
This function moves the displayed window down the record by one line. The cursor remains in the same position within the data unless it is on the top line of the screen in which case it will move down by one line.
Nudge up (Ctrl-X Ctrl-P or Ctrl-X Ctrl-Z)
This function moves the displayed window up the record by one line. The cursor remains in the same position within the data unless it is on the last line of the screen in which case it will move up by one line.
Align text (Esc-tab)
This function aligns the data on the current line to align text with the preceding line.