explaingit

maxonvim/tmux-underkeys

13ShellAudience · developerComplexity · 2/5Setup · easy

TLDR

tmux-underkeys is a tmux plugin that underlines one unique character per session name in the status bar so you can jump to any session instantly by pressing a trigger key plus that character, no memorization needed.

Mindmap

mindmap
  root((tmux-underkeys))
    What it does
      Visual session switcher
      Underlines key characters
      Stable key assignment
    How it works
      Trigger key plus character
      First unclaimed letter
      Ordered by creation time
    Setup
      TPM plugin manager
      One config line
      Configurable trigger key
    Audience
      Terminal power users
      Developers
      tmux users
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Switch between named tmux sessions by pressing a trigger key and one visible character without opening a session list or remembering positions.

USE CASE 2

Organize multiple project sessions in tmux and jump between them at a glance using the underlined hint always visible in the status bar.

USE CASE 3

Add mnemonic session switching to a custom tmux status line layout by positioning the plugin segment wherever you prefer.

Tech stack

ShelltmuxTPM

Getting it running

Difficulty · easy Time to first run · 5min

In plain English

tmux-underkeys is a plugin for tmux, the terminal multiplexer that lets you run multiple terminal sessions inside a single window. The plugin solves a small but recurring friction point: switching between named sessions without having to open a session list or remember which number or position each session occupies. The approach is visual and mnemonic. The plugin picks one unique character from each session name and underlines it in the tmux status bar. To switch to any session, you press a trigger key (Control-g by default) followed by that underlined character. Because the characters are always visible in the status bar and derived directly from the session names, you do not need to memorize anything separately from what you can already see on screen. Key assignment is stable as long as session names do not change. Sessions are processed by creation time, so adding a new session gives it its own character without shifting the keys already assigned to existing sessions. For each session, the plugin picks the first alphanumeric character in the name that has not already been claimed. So if you have sessions named "app" and "api", the first gets "a" and the second gets "p". Installation uses TPM, the standard tmux plugin manager: add one line to your tmux configuration file and press the TPM install key combination. The trigger key, display position, character style, sort order, and separator between session labels are all configurable through tmux options. The status bar segment can also be turned off if you want to position it yourself in a custom status line layout.

Copy-paste prompts

Prompt 1
I have tmux sessions named dev, api, db, logs, and test. Using tmux-underkeys, which character would be underlined for each session and how would I jump to the 'db' session?
Prompt 2
Help me configure tmux-underkeys to use Ctrl-b as the trigger key instead of the default Ctrl-g, and move the underlined session list to the right side of the status bar.
Prompt 3
I installed tmux-underkeys with TPM but two of my session names start with the same letter. Explain how the plugin picks the underlined character when the first letter is already claimed by another session.
Open on GitHub → Explain another repo

← maxonvim on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.