Tmux is a terminal multiplexer that allows you to split your terminal into multiple panes and windows, enhancing your productivity by providing a seamless way to manage and organize your terminal sessions. It's like having multiple terminals within one, all in a single window.
What do we have here? My Tmux configuration file!πͺ
Who can use it? Anyone can use it!πΊ
Before using this Tmux configuration, make sure you have the following installed on your system:
-
Tmux: Ensure Tmux is installed on your system.
-
Terminal Emulator: Use a compatible terminal emulator-you have probably one installed (e.g.,Kitty, Alacritty, GNOME Terminal).
-
reattach-to-user-namespace
: Required for clipboard support on MacOS (installable via Homebrew).
-
Install the programs listed above using your package manager or download them from their respective websites.
-
Copy the config file: Linux & MacOS & WSL: Copy and paste the following command into the terminal and press 'enter':
git clone https://github.com/YanivZalach/Tmux_Config.git ~/.Tmux_Config mv ~/.Tmux_Config/.tmux.conf ~/.
-
We are Done!
Get ready to supercharge your Tmux experience
Features π
- π±οΈ Mouse Support: Enjoy using the mouse in Tmux with your preferred terminal emulator.
- β±οΈ Status Bar: Information-rich status bar displayed at the top.
- π Automatic Renumbering: Windows are automatically renumbered to fill gaps.
- π Immediate Window Switching: Quickly change windows using arrow keys.
- π 256 Colors: Supports 256-color terminals for a colorful experience.
Key Bindings
-
Prefix Key π
- π―
C-a
,C-x
: Your starting point. This is the prefix key. All Tmux commands begin with this key followed by another keybinding.
- π―
-
General Commands π οΈ
-
π§²
<Prefix> s
: Detouch (quit and save) Tmux session. -
M
<Prefix> :
: Command Prompt -
π
<Prefix> r
: Reload your Tmux configuration. -
πͺ
<Prefix> q
: Confirm and kill the current pane. -
πͺ
<Prefix> X
: Confirm and kill the current window. -
πͺ
<Prefix> Q
: Confirm and kill the entire session. -
π
<Prefix> C-l
: Clearing the terminal window
-
-
Session Management πͺ
- π
<Prefix> C-s
: Session Tree - π
<Prefix> M
: Rename the current session.
- π
-
Window Management πͺ
-
πͺ
<Prefix> c
: Create a new Tmux window. -
ποΈ
<Prefix> m
: Rename the current window. -
β¬ οΈ
S-Left
: Move to the Left window. -
β‘οΈ
S-Right
: Move to the Right window. -
π
C-S-Left
: Move window to the Left. -
π
C-S-Right
: Move window to the Right . -
π
<Prefix> t
: Move to the next window. -
π
<Prefix> T
: Move to the previous window. -
π
<Prefix> C-o
: Rotate windows (circularly).
-
-
Pane Management πͺ
-
π
<Prefix> S
: Synchronize panes. -
π
<Prefix> d
: Display pane numbers. -
π§©
<Prefix> e
: Move to the previously active pane. -
β‘οΈ
<Prefix> x
: Split the current pane horizontally (x axis). -
β¬οΈ
<Prefix> y
: Split the current pane vertically (y axis). -
π
<Prefix> C-y
: Use a horizontal layout. -
π
<Prefix> C-x
: Use a vertical layout. -
β©
<Prefix> Enter
: Switch to the next layout. -
β¬ οΈ
A-Left
: Resize pane to the left Not in Nvim. -
β‘οΈ
A-Right
: Resize pane to the right Not in Nvim. -
β¬οΈ
A-Up
: Resize pane up Not in Nvim. -
β¬οΈ
A-Down
: Resize pane down Not in Nvim. -
β¬ οΈ
<Prefix>-Left
: Resize pane to the left. -
β‘οΈ
<Prefix>-Right
: Resize pane to the right. -
β¬οΈ
<Prefix>-Up
: Resize pane up. -
β¬οΈ
<Prefix>-Down
: Resize pane down. -
β¬ οΈ
C-h
: Move to the pane on the left Not in Vim/Nvim. -
β‘οΈ
C-l
: Move to the pane on the right Not in Vim/Nvim. -
β¬οΈ
C-k
: Move to the pane above Not in Vim/Nvim. -
β¬οΈ
C-j
: Move to the pane below Not in Vim/Nvim. -
β¬ οΈ
<Prefix> h
: Move to the pane on the left. -
β‘οΈ
<Prefix> j
: Move to the pane on the right. -
β¬οΈ
<Prefix> k
: Move to the pane above. -
β¬οΈ
<Prefix> l
: Move to the pane below.
-
-
Copy Mode π
-
π
<Prefix> [
: Enter copy mode. -
π
<Prefix> ]
: Paste from the clipboard. -
βοΈ
v
: Start selection (while in copy mode). -
π
y
: Copy selected text to the system clipboard (in MacOS requires reattach-to-user-namespace).
-
The installation is not working:
-
Make sure you have Git installed on your computer. Open the terminal and run the following command:
git --version
If Git is installed, you will see the installed version. If not, you need to install it using your package manager. Then retry the Installation.
-
Check if a file/directory already exists
Check if the
~/.Tmux_Config
or~/.tmux.conf
already exists. Open the terminal and run the following command to check if they exists:-
To check if the
~/.tmux.conf
directory exists, run:cat ~/.tmux.conf
Is found, run:
mv ~/.tmux.conf ~/.tmux.conf_b
-
To check if the
~/.Tmux_config
directory exists, run:ls ~/.Tmux_Config
Is found, run:
mv ~/.Tmux_Config ~/.Tmux_Config_b
Then retry the Installation.
-
A special thanks to the Tmux community for their support.