Skip to content

Latest commit

 

History

History
104 lines (61 loc) · 3.24 KB

TMUX.md

File metadata and controls

104 lines (61 loc) · 3.24 KB

tmux refresher

Start tmux as a session so that in case of a disconnection you session is still active on the host.

Default prefix key is ⌃ Control + b but we have changed it to ⌃ Control + a

Sessions

Create new tmux session

tmux new -s session-name

Attach to a session

tmux ls
tmux attach -t session_name

Detach from a Session: prefix d

Rename a session: prefix ,

Copy Mode

Move to Copy Mode: prefix [

Use page up and page down to move around. Hit space to enter into copy mode, select text, hit ⏎ Enter to copy into the vim buffer.

Open vim to paste: prefix ] to paste

Synchronize Panes

prefix :setw synchronize-panes to synchronize panes and again to disable

Navigation

Send window as a pane to another window: prefix s

Join a window as a pane to current window: prefix j

Moving pane to its own window: prefix !

Change to the next layout (move through layouts): prefix space

Veritcal split: prefix %

Horizontal split: prefix "

Move around in windows: prefix

Zoom in/out to any windows: prefix z

Resize a window: prefix ^ hold ctrl in this case

Move the window to other layout: prefix {

Move the window to other layout: prefix }

Logging

Toggle (start/stop) logging in the current pane.

  • Key binding: prefix shift+p
  • File name format: tmux-#{session_name}-#{window_index}-#{pane_index}-%Y%m%dT%H%M%S.log
  • File path: $HOME (user home dir)
    • Example file: ~/tmux-my-session-0-1-20140527T165614.log

Screen Capture

Save visible text, in the current pane. Equivalent of a "textual screenshot".

  • Key binding: prefix alt+p
  • File name format: tmux-screen-capture-#{session_name}-#{window_index}-#{pane_index}-%Y%m%dT%H%M%S.log
  • File path: $HOME (user home dir)
    • Example file: tmux-screen-capture-my-session-0-1-20140527T165614.log

Save complete history

Save complete pane history to a file. Convenient if you retroactively remember you need to log/save all the work.

  • Key binding: prefix alt+shift+p
  • File name format: tmux-history-#{session_name}-#{window_index}-#{pane_index}-%Y%m%dT%H%M%S.log
  • File path: $HOME (user home dir)
    • Example file: tmux-history-my-session-0-1-20140527T165614.log

NOTE: this functionality depends on the value of history-limit - the number of lines Tmux keeps in the scrollback buffer. Only what Tmux kept will also be saved, to a file.

Use set -g history-limit 110000 in .tmux.conf, with modern computers it is ok to set this option to a high number.

Clear pane history

Key binding: prefix alt+c

This is just a convenience key binding.