DEV Community

0 seconds of 1 minute, 56 secondsVolume 90%
Press shift question mark to access a list of keyboard shortcuts
00:00
00:00
01:56
 
Waylon Walker
Waylon Walker

Posted on • Originally published at waylonwalker.com

3 1

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

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (1)

Collapse
 
moopet profile image
Ben Sinclair

This series is getting kinda epic.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay