Files
reference/source/_posts/tmux.md
T
Fechin 172342c8a3 feat: modernize development toolchain
- Add comprehensive development tooling:
  * ESLint configuration with modern JavaScript rules
  * Prettier for consistent code formatting
  * Husky for Git hooks automation
  * lint-staged for pre-commit checks
  * Conventional Commits with commitlint
  * Stylelint for CSS code quality

- Fix CSS issues:
  * Resolve duplicate selectors in layout_note.css
  * Merge duplicate selectors in layout_list.css
  * Ensure stylelint compliance

- Apply consistent code formatting:
  * Format all JavaScript, CSS, and Markdown files
  * Standardize code style across the project
  * Fix console statement warnings in main.js

- Update project documentation:
  * Enhance README with modern development practices
  * Update package.json with new scripts and dependencies

This modernization establishes a robust development environment with
automated code quality checks, consistent formatting~
2025-06-18 14:09:17 +08:00

5.1 KiB
Raw Blame History

title, date, background, tags, categories, intro, plugins
title date background tags categories intro plugins
Tmux 2021-02-20 14:31:24 bg-emerald-600
utility
terminal
session
Linux Command
The tmux cheat sheet quick reference of most commonly used shortcuts and commands
copyCode

Tmux CLI

New session

Start a new session

$ tmux

Start a new named session

$ tmux new -s myname

Show all sessions

$ tmux ls

Attach session

Attach to last session

$ tmux a

Attach to named

$ tmux a -t myname

Kill session

Kill a session by name

$ tmux kill-ses -t myname

Kill sessions but the current

$ tmux kill-ses -a

Kill sessions but 'myname'

$ tmux kill-ses -a -t myname

Tmux help

$ tmux info

Config

Reload config

$ tmux source-file ~/.tmu­x.conf

Show config

$ tmux show-options -g

Copy Mode

Command Description
Ctrl+b [ Enter copy mode
<Space> Start selection
Enter Copy selection
q Quit copy mode
Ctrl+b ] Paste contents of buffer_0

For tmux version 3.5a on MacOS 15.3.1 Sequoia 'Copy Mode' functions lil bit differently Below I've written the differences | Command | Description | | ------------ | -------------------------- | | Ctrl + <Space> | Start selection | | Ctrl + w | Copy selection |


{.shortcuts}

Mainly works like selecting text in Vim

Tmux shortcuts

Getting started

Shortcuts Description
Ctrl+b ? List all shortcuts

{.shortcuts .show-header}



Show every session, window, pane, etc.

$ tmux info

Panes (Splits)

Shortcuts Description
Ctrl+b " / % Split Horiz/Vert
Ctrl+b ! Pane -> Window
Ctrl+b x Kill pane
Ctrl+b <Arrow> Navigate panes
Ctrl+b <Space> Toggle layouts
Ctrl+b { / } Move to Left/Right
Ctrl+b o Go to next panes
Ctrl+b z Toggle full-screen
Ctrl+b ; Toggle Last pane
Ctrl+b q Show numbers
Ctrl+b q 0...9 Go to # pane

{.shortcuts}

Window (Tabs)

- -
Ctrl+b c Create window
Ctrl+b p / n Previous/Next window
Ctrl+b " / % Split Horiz/Vert
Ctrl+b w List window
Ctrl+b , Rename window
Ctrl+b f Find window
Ctrl+b l Last window
Ctrl+b . Move window
Ctrl+b & Close window
Ctrl+b 0...9 Go to # window

{.shortcuts}

Session (Set of Windows)

- -
Ctrl+b d Detach from session
Ctrl+b s Show all sessions
Ctrl+b $ Rename session
Ctrl+b ( / ) Previous/Next session

{.shortcuts}

Tmux Command Mode

Usage

Command Description
Ctrl+b : Enter command mode

{.shortcuts}

Resizing

Command Description
resize-pane -D 20 Resize down
resize-pane -U 20 Resize up
resize-pane -L 20 Resize left
resize-pane -R 20 Resize right

Listing

Command Description
list-keys All commands
list-panes All panes
list-windows All Windows

Copying

Command Description
list-buffers List all buffers
show-buffer Show #0 contents
capture-pane Copy of pane
choose-buffer Show and paste
save-buffer a.txt Save to file
delete-buffer -b 1 Delete buffer 1

Setting

Command Description
set -g OPTION Set for all sessions
setw -g OPTION Set for all windows
setw -g mode-keys vi Enable vi-mode
set -g prefix C-a Set prefix

Misc

Command Description
swap-pane -s 3 -t 1 Swap pane
swap-window -t -1 Move to left
setw synchronize-panes Sync Panes
join-pane -t :# Join pane