Sunday, October 21, 2007

Navigation Keys

There exist 3 text-entry modes in the Treescript code editor:

  1. Free Form
  2. Structure Editor
  3. Code Menu

Pressing Esc toggles between Free Form and Structure Editor modes. Typing a question mark (?) enters Code Menu mode (except within comments and string literals; to enter Code Menu mode from inside those, press Ctrl+?). Pressing F1 displays context-sensitive help in all modes.

Structure Editor: a bottom-level token (e.g. a keyword, identifier, operator, or constant) or an entire list is often highlighted. Using the Shift key in conjunction with the Up/Down Arrow keys, it is possible to select more than one token/list at a time.

  • Esc - enter Free Form mode
  • Up Arrow - go to previous list element
  • Down Arrow - go to next list element
  • Left Arrow - go to parent list
  • Right Arrow - go to first child element (if none, display text cursor following current bottom-level token)
  • Shift+Up/Down Arrow - select a range of tokens/lists
  • Printable Char. - insert token/list, display text cursor
  • Backspace - undo insertion of previous printable char.
  • Delete - delete current token/list
  • Enter - display text cursor, insert space after cursor
  • Space - display text cursor, insert space before cursor
  • Ctrl+Enter – if at end of line, append blank line (otherwise break line into 2 lines)

Code Menu: a popup menu above or below text cursor (and including text cursor) is displayed. The contents of this menu include all valid code elements in the context of the text cursor (ignoring anything after the text cursor).

  • Esc - show/hide code menu
  • Up Arrow - move selection up
  • Down Arrow - move selection down
  • Left Arrow - go to parent code menu (if none, exit Code Menu mode)
  • Right Arrow - go to lower-level code menu
  • Enter - go to lower-level code menu (if none, select current menu item, and display new code menu following token/list just inserted)
  • Space - go to lower-level code menu (if none, select current menu item and exit Code Menu mode)
  • Printable Char. - incrementally select matching menu item
  • Backspace - undo operation of previous printable char.
  • Question Mark - exit Code Menu mode

No comments: