$ tmux //start new session
$ tmux ls //list sessions
$ tmux a //attach
$ tmux a -t sessionName //attach to a target- C-b :new [enter] new session
- C-b s list sessions
- C-b $ rename session
- C-b d detach
- C-b C-n new window
- C-b w list windows
- C-b , rename window
- C-b % horizontal split
- C-b " vertical split
- C-b o swap panes
- C-b q show pane numbers
- C-b x kill pane
- C-b [space] toggle between layouts
- C-b hold[option] [arrow key] resize panes
- C-b [ enter copy mode (scrolling history)
- Increase history buffer size
# ~/.tmux.conf
set -g history-limit 8000
set -g default-terminal "xterm-256color"
- In visual mode
1. Mark the range
2. Type :s/foo/bar/g - Whole document
:%s/foo/bar/g