The Line Editor

Many operations in TEAPOT require editing a line of text, e.g. editing cell contents, typing file names and the like. Similar to the command mode, all things can be reached by control codes and most by function keys. Table tab:Key-Bindings-forLineEditor lists all available key bindings, again with brackets for those keys that only work in the console variant and curly braces for the graphical variant.

Table 4: Key Bindings for the line editor
Function Key ASCII Key Operation
Previous Character/Left Arrow [Ctrl-B] Move cursor left
Next Character/Right Arrow [Ctrl-F] Move cursor right
Begin/Home [Ctrl-A] Move cursor to column 0
End [Ctrl-E] Move cursor to last column
Enter [Ctrl-J] [Ctrl-M] Finish editing/accept line
  Ctrl-L Redraw screen
  [Ctrl-T] Transpose characters
  [Ctrl-\] Go to matching paren
Cancel [Up Arrow] {Esc} [Ctrl-G] [Ctrl-C] Abort editing
Backspace [Ctrl-H] Delete previous character
  [Ctrl-K] Delete rest of line
Delete [Ctrl-?] [Ctrl-D] Delete current character
  [Tab] File name completion
Insert   Toggle insert mode
{Tab} [Ctrl-O] Toggle motion in sheet (see text)

Besides the regular line editor operations, you may use Ctrl-O (Tab in the GUI version) to temporarily leave the editor in order to move around in the sheet if you are editing cell contents. Another Ctrl-O (resp. Tab) brings you back to the line editor. While moving around in the sheet, you can insert the value (v) or position (p) at the cursor position in the edited cell. Clicking on a cell while editing has the same effect as moving to that cell and pressing (p).

Aborting line editing means that you will return immediately to command mode; whatever you started doing will have no effect.