- Published on
Learning and configuring tmux
- Authors
- Name
- Chris Postma
I'm working to transition to VIM for my daily development work and tmux is a natural partner for a terminal based editor.
I recently followed a video by Josean Martinez where he describes his tmux setup from dotfiles all the way to keyboard shortcuts and have decided to use this as my starting point. You can view my dotfiles on GitHub here.
If attempting to use the below bindings, be sure to follow the linked tutorial above, as some bindings require plugins and others require bindings specified in tmux.conf
.
Keyboard bindings
Command | Description |
---|---|
ctrl+b also written as C-b | prefix or leader command |
tmux new -s <session_name> | create new session with name |
tmux detach | exit session |
tmux ls | list all sessions |
tmux attach -t <session_name | attach to session with name |
C-b r | custom binding to source tmux.conf |
C-b I | install plugins |
C-b s | view all sessions (interactive), use j and k to move between options |
C-b | | split window vertically |
C-b - | split window horizontally |
C-b h | resize pane left |
C-b j | resize pane down |
C-b k | resize pane up |
C-b l | resize pane right |
C-b m | maximize pane |
C-b n | return pane to original size |
C-h | move left one pane |
C-j | move down one pane |
C-k | move up one pane |
C-l | move right one pane |
C-b c | create new tmux window |
C-b <window_number> | navigate to window by window number |
C-b , | rename a window |
C-b n | next window |
C-b p | previous window |
C-b w | view all windows |
C-d | close current pane |
C-b & | close current window |
C-b x | kill pane |
Command | Description |
---|---|
C-b [ | enter copy mode in tmux |
h,j,k,l | movement (copy mode) |
v <motion> | copy text from terminal |
J | scroll down |
K | scroll up |
C-u | scroll up half page |
C-d | scroll down half page |
C-f | scroll up full page |
C-b | scroll down full page |