Skip to content

Latest commit

 

History

History
69 lines (48 loc) · 2.16 KB

keybindings-tmux.asciidoc

File metadata and controls

69 lines (48 loc) · 2.16 KB

tmux shortcuts overview

Prefix key: CTRL+SPACE

Sessions

Create new sessions

  • tmux: Creates a new session and attaches to it

  • tmux new -s my-session: Creates the session my-session and attaches to it

  • In tmux, use PREFIX :new to create a new session

  • In tmux, use PREFIX :new -s my-session to create the session my-session

Attach / detach to an existing session

  • tmux attach : will reattach to the most recent session

  • tmux attach -t my-session : attaches to my-session

  • PREFIX+d : detaches from current session

List sessions

  • tmux ls : lists all sessions (from the shell)

  • PREFIX+s : lists all sessions (from tmux)

  • PREFIX+w : lists all sessions and allows to preview windows

Kill/Delete sessions

  • tmux kill-session -t my-session : kills/deletes my-session

  • tmux kill-session -a : kills/deletes all session except the current

  • tmux kill-ses -a -t my-session : kills/deletes all session except my-session

Rename sessions

  • PREFIX+$ : rename the session

Windows

  • PREFIX+C : New window

  • SHIFT+ALT+H : Cycles to the next window

  • SHIFT+ALT+L : Cycles to the previous window

  • PREFIX+& : Closes a window

Panes

Create / remove panes

  • PREFIX+% : Splits a window horizontally

  • PREFIX+" : Splits a window vertically

  • PREFIX+x : Closes the pane

Move between panes

  • ALT+arrows : Navigates between the panes

  • CTRL+h j k l : Navigates between the panes

  • PREFIX+{ : Moves the pane left within the window

  • PREFIX+} : Moves the pane right within the window

  • PREFIX+q : Displays pane numbers

  • PREFIX+q then pane number : makes the pane active

  • PREFIX+z : Makes the active pane take the full window

  • PREFIX+! : Turns the active pane into a new window

Copy mode

  • CTRL+[ : enters copy mode, use vim keys to move the cursor

  • v : enters vim-like selection mode

  • CTRL+v : toggles between line mode and rectangleW select mode

  • y : yanks the selection