.tmux.conf
My most up to date config file is at github: .dotfiles/.tmux.conf, and for better experience, I strongly suggest you use Capslock as your Ctrl key (I set C-a as my prefix instead of C-b).
| |
Key Bindings
prefixmeansC-bby default, orC-afor me.
list all shortcust:prefix ?
sessions
- list session:
tmux ls,prefix s - new session:
tmux new -s session_name(attach now),tmux new -ds session_name(do not attach) - attach session:
tmux a -t session_name - create or attach session:
tmux new -A -s session_name - detach session:
prefix d - rename session:
prefix $ - kill session:
tmux kill-session -t session_name - previous/next session:
prefix (/)
windows
- new window:
prefix c - next/previous window:
prefix n/p - rename window:
prefix , - kill window:
prefix &
panes
- change focus between panes:
prefix h/j/k/l - resize pane:
prefix C-h/j/k/l - split pane:
prefix | - vsplit pane:
prefix - - toggle zoom:
prefix z - kill pane:
prefix x - scroll pane: use mouse wheel or
prefix [then with vi motions - toggle between pane layouts:
prefix SPACE - display panes / show pane numbers:
prefix q(given a number, jump to that pane) - swap with previous/next pane:
prefix {/}
copy & paste
- within tmux
- select & copy with your mouse
- or first enter navigation:
prefix [, then- navigate with vi motions:
hjkl,C-f,C-b, … vorshift+vto start character/line level selectionoto change active end of selectionyto yank (copy) orqto quit navigationprefix ]to paste selection
- navigate with vi motions:
- bettwen tmux and your host
- hold shift and use mouse to select
- copy with
Ctrl+Shift+corCtrl+c(depends on your system/terminal settings) - paste with
Ctrl+Shift+vorCtrl+v(depends on your system/terminal settings)
- command line
tmux save-buffer -save paste buffer to file (here use-as a filename to mean stdin/stdout).tmux paste-buffertmux set-buffertmux choose-buffer
| |