Overview
Tmux is a terminal multiplexer that allows you to manage multiple terminal sessions, windows, and panes within a single terminal window. This configuration includes vi-mode keybindings, custom plugins, and a TokyoNight theme.Configuration
The main configuration is located at.config/tmux/tmux.conf.
Basic settings
True color
Terminal override enables 24-bit true color support
Escape time
Zero escape time for instant key response
Mouse support
Mouse mode enabled for clicking and scrolling
Vi mode
Vi-style keybindings for copy mode
Prefix key
The prefix is changed from the defaultCtrl+b to Ctrl+a:
Ctrl+a is easier to reach and commonly used in screen and other terminal multiplexers.Window and pane indexing
Windows and panes start at 1 instead of 0 for easier keyboard access:Vi mode keybindings
Copy mode uses vi-style keybindings:Visual selection
Visual selection
Press
v in copy mode to begin selection, just like in Vim:Copy to clipboard
Copy to clipboard
Press
y to copy the selection to the system clipboard using xclip:Status bar
The status bar is positioned at the top:Image passthrough
Image passthrough is enabled for displaying images in the terminal:Plugins
Tmux Plugin Manager (TPM) is used to manage plugins:tpm
Tmux Plugin Manager for easy plugin installation
vim-tmux-navigator
Seamless navigation between vim and tmux panes
tokyo-night-tmux
TokyoNight theme for tmux status bar
tmux-yank
Enhanced clipboard integration
tmux-resurrect
Save and restore tmux sessions
tmux-sensible
Sensible default settings for tmux
Tmux Resurrect configuration
Tmux Resurrect is configured to save Neovim sessions and pane contents:This allows you to save and restore your entire tmux environment, including running programs and pane layouts.
TokyoNight theme settings
Custom keybindings
Pane navigation
Vim-style pane navigation:Navigation keys
Navigation keys
Split windows
Split windows open in the current pane’s directory:Tmux cheat sheet script
A custom keybinding opens an interactive cheat sheet using cht.sh:tmux-ch.sh script
The script (scripts/tmux/tmux-ch.sh) provides quick access to programming language and command cheat sheets:
Press
prefix + C to open an fzf menu of languages and commands. Select one, enter your query, and instantly get documentation from cht.sh.Plugin installation
The TPM plugin manager is loaded at the end:Installation
- Install tmux and dependencies:
- Symlink the configuration:
- Install plugins:
- Start tmux
- Press
prefix + I(capital i) to install plugins
After installation, reload the configuration with
prefix + r or restart tmux.Quick reference
Essential keybindings
Essential keybindings
Ctrl+a: Prefix keyprefix + c: Create new windowprefix + ": Split horizontallyprefix + %: Split verticallyprefix + h/j/k/l: Navigate panes (vim-style)prefix + C: Open cheat sheetprefix + [: Enter copy modeprefix + I: Install plugins
Copy mode
Copy mode
prefix + [: Enter copy modev: Begin selectiony: Copy selection to clipboardq: Exit copy mode
Session management
Session management
prefix + Ctrl+s: Save session (tmux-resurrect)prefix + Ctrl+r: Restore session (tmux-resurrect)