Here is a tmux config file forked from Drams of Code, the tutorial video linked here.
First, clone this repo by:
git clone https://github.com/yfrua/tmux.git ~/.configAnd install tpm to get access to plugins, by
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpmAfter that, load it to tmux by
tmux source ~/.config/tmux/tmux.confFinally, run tmux and press Prefix + I (Ctrl+Space + I) to install the plugins.
The prefix key is changed to Ctrl+space rather than Ctrl+b.
By setting up vim-tmux-navigator, you can use Ctrl+h/j/k/l like vim shortcuts to navigate between tmux panes or between vim pane and tmux pane.
Prefix + h/j/k/l: move to left/down/up/right paneAlt + ←/→/↑/↓: move panes directly without prefixShift + ←/→: switch to previous/next windowAlt + Shift + h/l: switch to previous/next windowPrefix + ": split pane vertically (top/bottom)Prefix + %: split pane horizontally (left/right)
This config enables vi mode for copy mode.
Prefix + [: enter copy modev: begin selectionCtrl+v: toggle rectangle selectiony: copy selection and exit copy mode (withtmux-yank)
- Window and pane indexes start from
1. - Windows are renumbered automatically after closing.
- Mouse mode is enabled.