Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was reading through the tmux man pages in order to understand the different options for bind-key and bumped into the -t flag:

If -t is present, key is bound in key-table: the binding for command mode with -c or for normal mode without. To view the default bindings and possible commands, see the list-keys command.

What's the key-table exactly? how does this command differs from the normal bind-key command?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

The key-tables are named in the description of the list-keys command and described earlier in the man page:

  • vi-edit, emacs-edit

    Used while editing a line at a command prompt.
    E.g. via command-prompt, confirm-before, or the “Goto Line”, “Search Up”, or “Search Down” prompts in copy-mode

  • vi-choice, emacs-choice

    Used when choosing from lists.
    E.g. via choose-client, choose-session, choose-window, choose-tree, choose-list, choose-buffer, or find-window

  • vi-copy, emacs-copy

    Used when viewing scrollback or other output.
    E.g. copy-mode, run-shell output, or errors from a startup configuration file or source-file.

The keys bound in these tables are active when the various “modes” are active. They do not require the Prefix key, since the “mode” itself supersedes any normal interaction with the active pane.

Additionally, the bindings in these tables are restricted to particular special-purpose commands (e.g. related to movement and editing), and each key can only be bound to a single command (i.e. \; can not be used to bind a key to a sequence of multiple commands).

These “mode commands” are not described in the man page, but you should be able to find most of them by inspecting the listings for the tables (e.g. tmux list-keys -t emacs-copy, et cetera) or from the source code (mode-key.c); their names are generally self-descriptive (e.g. cursor-up, page-up, cancel, et cetera).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.