Bindings (ui_binding.c) - larrykollar/tines GitHub Wiki

Bindings (ui_binding.c)

Editing bindings and contexts. Many of these commands are executed in ui_edit.c.

Configuration commands

  • bind <key> <action>
    Creates a keybinding in the current context. The virtual key .. adds actions to the last-defined key, allowing a single key to perform multiple actions. Each context may have up to 255 key bindings.

  • unbound
    Displays an error message for keys not bound to another action.

  • ignore
    Ignores the current input. Can be used to bind a key you want silently ignored.

  • confirm <text>
    Confirms the action.

  • context <name>
    Switches to the named context, pre-defined or user-defined (you can create up to 12 user-defined contexts). The predefined contexts are:

    • main: The primary context for navigating through the tree.
    • confirm: Used for confirming a user action (such as deleting).
    • nodeedit: Used for editing a node.
    • lineedit: Used for line input (query and commandline commands).
  • command <param>
    (executed in evilloop.c) Executes <param> as a CLI command.

  • quit
    (executed in evilloop.c) Quits without saving.

Movement commands (entry-level)

  • up
    Moves the cursor or the selection up.
  • down
    Moves the cursor or the selection down.
  • left
    Moves the cursor or the selection left.
  • right
    Moves the cursor or the selection right.
  • top
    Moves to the topmost sibling of the current entry.
  • bottom
    Moves to the last sibling of the current entry.
  • pageup
    Moves up a page of entries.
  • pagedown
    Moves down a page of entries.

Movement commands (edit-level)

  • bol
    Moves to the beginning of the entry.
  • eol
    Moves to the end of the entry.
  • skipword
    Moves the cursor forward one word.
  • bskipword
    Moves the cursor back one word.

Editing commands

  • backspace
    Moves the cursor back one space.
  • delete
    Deletes the character under the cursor.
  • kill_word
    Deletes the word under the cursor.
  • bkill_word
    Deletes the word to the left of the cursor.
  • kill_to_bol
    Deletes all the text from the cursor to the beginning of the entry.
  • kill_to_eol
    Deletes all the text from the cursor to the end of the entry.
  • kill_line
    Deletes the line under the cursor.
  • cancel
    Cancels edit mode without saving changes.
  • complete
    Outputs possible completions of the partially-entered command or variable name.
  • join
    Combines the subsequent entry with the following entry.
  • split
    Splits the entry at the cursor position.