From d66226015b6f4b807f050195d01690e932c855fb Mon Sep 17 00:00:00 2001 From: Solomon Laing Date: Mon, 6 Feb 2023 11:24:33 +1030 Subject: [PATCH] major updates to tmux conf --- .config/tmux/tmux.conf | 57 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 2f08da3..c4a95b2 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -1,8 +1,63 @@ -set -ga terminal-overrides ",xterm-256color*:Tc" +# ----------------------------------------------------------------------------- +# This config is targeted for tmux 3.0+. +# +# Read the "Plugin Manager" section (bottom) before trying to use this config! +# ----------------------------------------------------------------------------- + +# ----------------------------------------------------------------------------- +# Global options +# ----------------------------------------------------------------------------- + +# Enable color support inside of tmux. +set -g default-terminal "xterm-256color" +set -ga terminal-overrides ",*256col*:Tc" + +# Remove time delay when switching between vim modes set -s escape-time 0 +# Allow opening multiple terminals to view the same session at different sizes. +setw -g aggressive-resize on + bind r source-file ~/.tmux.conf +# Ensure window titles get renamed automatically. +setw -g automatic-rename + +# Ensure window index numbers get reordered on delete. +set-option -g renumber-windows on + +# Start windows and panes index at 1, not 0. +set -g base-index 1 +setw -g pane-base-index 1 + +# Enable full mouse support. +set -g mouse on + +# ----------------------------------------------------------------------------- +# Key Binds +# ----------------------------------------------------------------------------- + # forget the find window. That is for chumps bind-key -r f run-shell "tmux neww tmux-sessionizer" bind-key -r i run-shell "tmux neww cht.sh" + +# Reload the tmux config. +bind-key r source-file ~/.config/tmux/tmux.conf + +# Split panes. +bind-key b split-window -v +bind-key v split-window -h + +# ----------------------------------------------------------------------------- +# Plugin Manager - https://github.com/tmux-plugins/tpm +# Step 1) git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm +# Step 2) Reload tmux if it's already started with `r +# Step 3) Launch tmux and hit `I (capital i) to fetch any plugins +# ----------------------------------------------------------------------------- + +# List of plugins. +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-resurrect' + +# Initialize TPM (keep this line at the very bottom of your tmux.conf). +run -b '~/.tmux/plugins/tpm/tpm'