Tmux is a terminal multiplexer. It is a smarter terminal that can let you code with minimum usage of mouse. This configuration file is valid for Tmux version 1.9 or greater. This article can relate why you should try to go full keyboard.
Prefix mapped to Ctrl-a
because in my opinion it's easier than the default prefix Ctrl-b.
This Tmux configuration has many plugin to make you throw your mouse away. They are:
- Tmux Plugin Manager - must have
- Tmux Resurrect
- Tmux Online Status
- Tmux Battery
- Tmux CPU
- Tmux Sidebar
Install base-16-color to get the desired color scheme.
- Clone the repo:
git clone https://github.com/muhrifqii/tmux-vim-config
- Make the
install.sh
executable:
chmod +x install.sh
- Run
install.sh
./install.sh
- Download Tmux Plugin Manager:
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
- Update tmux config:
tmux source-file ~/.tmux.conf
- Download Tmux Plugin Manager (only if you do not have it yet):
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
- Just copy the desired part in this .tmux.conf on your own .tmux.conf file.
- Do exactly the same like the step 4 and 5 on Option 1
Launch tmux:
tmux
And press Control + a
then d
to go back to the terminal.
To start a session:
tmux
To show the active tmux session:
tmux ls
To reattach a previous session:
tmux a -t {session-name}
To reload config file inside tmux
<Control + a>:
(Prefix key then :
) then source-file ~/.tmux.conf
In case you miss the top of README content, this configuration uses prefix key Ctrl + a
. This prefix is a typed before any tmux shortcut sequence.
Ctrl + a
before any commandCtrl + a
thend
to detach session without closing itCtrl + a
then?
to bring up list of keyboard shortcutsCtrl + a
then"
to split window into view pane horizontallyCtrl + a
then%
to split window into view pane verticallyCtrl + a
thenCtrl + (arrow)
to configure the pane sizeCtrl + a
then(arrow)
to move between view panealt + arrow
can also be used to move between view panealt
thenh
,j
,k
, orl
can also be used to move between pane (so the vim hjkl wont be forgotten)Control + a
thenc
to create a new windowControl + a
thenn
to next windowControl + a
thenp
to previous windowControl + a
then[0-9]
move to window numberControl + a
then&
to kill window