https://www.youtube.com/watch?v=DzNmUNvnB04
brew install tmux
# Check version ('V' is capital V)
tmux -V
https://github.com/tmux-plugins/tpm
- Create a config file
touch ~/.config/tmux/tmux.conf
TMUX contains three objects
- Sessions
- Windows
- Panes
TMUX by defaults use ctrl + b
as prefix
Function | Key Combination |
---|---|
Create new window | prefix c |
Select a window | prefix window-number |
Cycle between windows | prefix n (or) prefix p |
Kill window | prefix & |
Vertical Panes | prefix % |
Horizontal Panes | prefix " |
Navigate panes | prefix arrow-keys |
Swap panes | prefix { (or) prefix } |
Choose a pane | prefix q -> and then select a number |
Zoom into a pane | prefix z |
Turn pane into window | prefix ! |
Close the pane | exit or prefix x |
# create a tmux session
tmux
# create a tmux session with name
tmux new -s my-session
Access
command mode
in TMUX inside a window using -> prefix +:
(much like VIM)
# create new session from inside a session
:new
# See all sessions running
tmux ls
# see all sessions - from inside a session
prefix s
# see all sessions and windows - from inside a session
prefix w
# attach to recent session
tmux attach
# attach to specific session
tmux attact -t my-session
https://github.com/christoomey/vim-tmux-navigator
This gives us the ability to navigate split panes using ctrl
+ h
/ j
/ k
/ l
https://github.com/dreamsofcode-io/tmux/blob/main/tmux.conf
tmux.conf
yanked from above link