CheatSheet
Tmux
Tmux
Start
$ tmux //start new sessionStart
$ tmux ls //list sessions
$ tmux a //attach
$ tmux a -t sessionName //attach to a target
Sessions
Sessions
- C-b :new [enter] new session
- C-b s list sessions
- C-b $ rename session
- C-b d detach
Windows
Windows
- C-b C-n new window
- C-b w list windows
- C-b , rename window
Panes
Panes
- 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
Misc.
Misc.
- C-b [ enter copy mode (scrolling history)
- Increase history buffer size
set -g history-limit 8000
set -g default-terminal "xterm-256color"
Screen
Screen
- Frequently Used
Vim
Vim
Substitution
Substitution
- In visual mode
1. Mark the range
2. Type :s/foo/bar/g - Whole document
:%s/foo/bar/g