DEV Community

Play Button Pause Button
Waylon Walker
Waylon Walker

Posted on • Originally published at waylonwalker.com

Remember you tmux hotkeys with list-keys

Tmux list keys can be a useful tool to help remind you of what kebindinfs you
have setup. You can search for them and scroll just like in tmux copy-mode.

command line

You can call list-keys from the command line but the interface is not very
usable by itself. It might be nice to mix with grep or a pager in some
circumstances.

tmux list-keys
Enter fullscreen mode Exit fullscreen mode

tmux command line

Running list-keys from within the tmux command line puts you into a much more
pleasant copy-mode.

list-keys
Enter fullscreen mode Exit fullscreen mode

default keybinging

By default tmux comes with list-keys bound to prefix+?.

bind-key          ? list-keys
Enter fullscreen mode Exit fullscreen mode

list-keys man page

You can see the additional flags provided by tmux in the man page for
list-keys.

list-keys [-1aN] [-P prefix-string -T key-table] [key]
            (alias: lsk)

        List key bindings.  There are two forms: the default lists keys as
        bind-key commands; -N lists only keys with attached notes and shows
        only the ke y and note for each key.

        With the default form, all key tables are listed by default.  -T lists only keys in key-table.

        With the -N form, only keys in the root and prefix key tables are
        listed by default; -T also lists only keys in key-table.  -P specifies
        a prefix to print before each key and -1 lists only the first matching
        key.  -a lists the command for keys that do not have a note rather than
        skipping them.

Enter fullscreen mode Exit fullscreen mode

Be sure to check out the full YouTube playlist and subscribe if you like it.

tmux playlist on youtub

Top comments (1)

Collapse
 
moopet profile image
Ben Sinclair

This series is getting kinda epic.