Skip to content

Instantly share code, notes, and snippets.

@davidlaprade
Last active August 2, 2016 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidlaprade/0c54559e9e1007e6aa5b to your computer and use it in GitHub Desktop.
Save davidlaprade/0c54559e9e1007e6aa5b to your computer and use it in GitHub Desktop.
Tmux Commands

Inspired by https://gist.github.com/henrik/1967800 NOTE: These presuppose my dotfiles

  • t tmux
  • tmux start new session
  • tmux new -s myname start new with session name
  • tmux a attach
  • tmux a -t <name> attached to named session
  • tma <name> tmux attach to named session, with tab autocomplete
  • tat tmux attach to a session named after the current directory
  • tmux ls list sessions
  • tmux kill-session -t <name> kill session named
  • tmux kill-session -a kill all sessions

Within tmux Session

  • prefix == CTRL + s, this saves CTRL + a for jumping to the start of a line
  • <prefix> d to kill session
  • <prefix> j jump to tmux pane below current pane (presupposes dotfiles)
  • <pre> % open new plane horizontally
  • <pre> " open new plane vertically
  • <pre> d detatch from current session
  • <pre> x close current pane
  • CTRL d close current pane
  • <pre> z zoom in on current pane (make it occupy entire screen), repeat to zoom out
  • <pre> c create new window in current session
  • <pre> t open 24-hr clock in present pane
  • <pre> h move to previous window
  • <pre> l move to next window
  • <pre> CTRL-l jump to last window you were on
  • <pre> L jump to last session you were on
  • <pre><n> jump to window n
  • <pre> b break pane out into its own window
  • <pre> C-j open choose tree mode to select a new window, to view panes while in choose-tree mode

Scroll Mode

  • <pre> k (custom) or <prefix> [ enter scroll mode
  • normal vim navigation/searching will work
  • y to copy the highlighted text into the OSX clipboard
  • q quit scroll mode
  • ? <string> search and find string above cursor
  • / <string> search and find string below cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment