Skip to content

Instantly share code, notes, and snippets.

@awwong1 awwong1/main.tex

Last active Mar 12, 2020
What would you like to do?
\usepackage{tabularx} % table layout with line breaks
\usepackage{color} % custom grey color support
\usepackage{soul} % text highlighting support
\usepackage{hyperref} % URL link support
\definecolor{lightgrey}{rgb}{0.925, 0.925, 0.925}
\renewcommand{\arraystretch}{1.2} % Default value: 1
\def\tabularxcolumn#1{m{#1}} % Vertical aligns cells in table
\pagenumbering{gobble} % no page numbering
\multicolumn{2}{l}{\textbf{Session Control (from the command line)}} \\ \hline
\cbox{tmux} & Start a new session \\
\cbox{tmux new -s \mbox{<session-name>}} & Start a new session with the name chosen \\
\cbox{tmux ls} & List all sessions \\
\cbox{tmux attach -t \mbox{<target-session>}} & Re-attach a detached session \\
\cbox{tmux attach -d -t \mbox{<target-session>}} & Re-attach a detached session (and detach it from elsewhere) \\
\cbox{tmux kill-session -t \mbox{<target-session>}} & Delete a session \\
\multicolumn{2}{l}{\textbf{Copy-Mode (vi)}} \\ \hline
\cbox{Ctrl} \cbox{b}, \cbox{[} & Enter copy mode \\
\cbox{Ctrl} \cbox{b}, \cbox{G} & Bottom of history \\
\cbox{Ctrl} \cbox{b}, \cbox{g} & Top of history \\
\cbox{Ctrl} \cbox{b}, \cbox{Enter} & Copy selection \\
\cbox{Ctrl} \cbox{b}, \cbox{p} & Paste selection \\
\cbox{Ctrl} \cbox{b}, \cbox{k} & Cursor Up \\
\cbox{Ctrl} \cbox{b}, \cbox{j} & Cursor Down \\
\cbox{Ctrl} \cbox{b}, \cbox{h} & Cursor Left \\
\cbox{Ctrl} \cbox{b}, \cbox{l} & Cursor Right \\
\multicolumn{2}{l}{\textbf{Copy-Mode (Emacs)}} \\ \hline
\cbox{Ctrl} \cbox{b}, \cbox{[} & Enter copy mode \\
\cbox{Ctrl} \cbox{b}, \cbox{M-<} & Bottom of history \\
\cbox{Ctrl} \cbox{b}, \cbox{M->} & Top of history \\
\cbox{Ctrl} \cbox{b}, \cbox{M-m} & Back to indentation \\
\cbox{Ctrl} \cbox{b}, \cbox{M-w} & Copy selection \\
\cbox{Ctrl} \cbox{b}, \cbox{M-y} & Paste selection \\
\cbox{Ctrl} \cbox{b}, \cbox{Ctrl} \cbox{g} & Clear selection \\
\cbox{Ctrl} \cbox{b}, \cbox{M-R} & Cursor to top line \\
\cbox{Ctrl} \cbox{b}, \cbox{M-r} & Cursor to middle line \\
\cbox{Ctrl} \cbox{b}, \cbox{$\uparrow$} & Cursor Up \\
\cbox{Ctrl} \cbox{b}, \cbox{$\downarrow$} & Cursor Down \\
\cbox{Ctrl} \cbox{b}, \cbox{$\leftarrow$} & Cursor Left \\
\cbox{Ctrl} \cbox{b}, \cbox{$\rightarrow$} & Cursor Right \\
\multicolumn{2}{l}{\textbf{Window Control}} \\ \hline
\cbox{Ctrl} \cbox{b}, \cbox{c} & Create new window \\
\cbox{Ctrl} \cbox{b}, \cbox{d} & Detach from session \\
\cbox{Ctrl} \cbox{b}, \cbox{,} & Rename current window \\
\cbox{Ctrl} \cbox{b}, \cbox{\&} & Close current window \\
\cbox{Ctrl} \cbox{b}, \cbox{w} & List windows \\
\cbox{Ctrl} \cbox{b}, \cbox{p} & Previous window \\
\cbox{Ctrl} \cbox{b}, \cbox{n} & Next window \\
\multicolumn{2}{l}{\textbf{Pane Control}} \\ \hline
\cbox{Ctrl} \cbox{b}, \cbox{"} & Split pane horizontally \\
\cbox{Ctrl} \cbox{b}, \cbox{\%} & Split pane vertically \\
\cbox{Ctrl} \cbox{b}, \cbox{o} & Next pane \\
\cbox{Ctrl} \cbox{b}, \cbox{;} & Previous pane \\
\cbox{Ctrl} \cbox{b}, \cbox{q} & Show pane numbers \\
\cbox{Ctrl} \cbox{b}, \cbox{z} & Toggle pane zoom \\
\cbox{Ctrl} \cbox{b}, \cbox{!} & Convert pane into a window \\
\cbox{Ctrl} \cbox{b}, \cbox{x} & Kill current pane \\
\cbox{Ctrl} \cbox{b}, \cbox{Ctrl} \cbox{O} & Swap panes \\
\cbox{Ctrl} \cbox{b}, \cbox{t} & Display clock \\
\cbox{Ctrl} \cbox{b}, \cbox{q} & Transpose two letters (delete and paste) \\
\cbox{Ctrl} \cbox{b}, \cbox{\{} & Move to the previous pane \\
\cbox{Ctrl} \cbox{b}, \cbox{\}} & Move to the next pane \\
\cbox{Ctrl} \cbox{b}, \cbox{Space} & Toggle between pane layouts \\
\cbox{Ctrl} \cbox{b}, \cbox{$\uparrow$} & Resize pane (make taller) \\
\cbox{Ctrl} \cbox{b}, \cbox{$\downarrow$} & Resize pane (make smaller) \\
\cbox{Ctrl} \cbox{b}, \cbox{$\leftarrow$} & Resize pane (make wider) \\
\cbox{Ctrl} \cbox{b}, \cbox{$\rightarrow$} & Resize pane (make narrower) \\
{A printable cheat sheet for \cbox{tmux} terminal multiplexer.
The complete list of options and commands are available at \href{}{}} or by running \cbox{man tmux}.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.