Skip to content

Instantly share code, notes, and snippets.

@becheru
Created January 12, 2022 13:06
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 becheru/78a1a54e3a21d7f089735d7f0c50481a to your computer and use it in GitHub Desktop.
Save becheru/78a1a54e3a21d7f089735d7f0c50481a to your computer and use it in GitHub Desktop.
#install tmux
brew install tmux
#tmux version
tmux -V
#location of tmux conf
~/.tmux.conf
#start new session
tmux new -s session_name
#tmux prefix to start commands
Ctrl+b
#Split screen in half (left/ right)
%
#Split screen in half (up/down)
"
#Kill current pane
x
#Switch between panes
directional arrows
#Attach to session
tmux attach -t session_name
#De-attach from session
d
#Create new window
c
#List all windows
w
#Find windows
f
#Indetify windows
q
#Change between panes views
space
#Kill current pane
x
#Kill current window
&
#Resize pane
:resize-pane [direction] row/colums
direction
- nothing = down
- -R = right
- -L = left
- -U = up
e.g.:
:resize-pane -R 20 shrinks the current pane 20 rows to the right
:resize-pane -t 2 -L 10 shrinks pane 2 10 rows to the lest
#move pane
:move-pane -d -s session_name:window_id -t session_name:windows_id
e.g.:
:move-pane -d -t test:0 moves current pane in session test window 0
:move pane -t :0 moves current pane in current session to window 0
#move current pane in a new window
:break-pane
#Rename window
,
#Create new window
c
#Enter selection mode
[
#Select
press SPACE and end with ENTER
#paste
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment