Skip to content

Instantly share code, notes, and snippets.

@CristaLCorp
Last active February 28, 2024 14:51
Show Gist options
  • Save CristaLCorp/66f741f649f46757ddfd6d93626a35a7 to your computer and use it in GitHub Desktop.
Save CristaLCorp/66f741f649f46757ddfd6d93626a35a7 to your computer and use it in GitHub Desktop.
~/.config/tmux/tmux.conf
# Keep the color scheme
set-option -sa terminal-overrides ",xterm*:Tc"
# Avoid weird characters on new session
set -sg escape-time 10
# Activate the mouse controls
set -g mouse on
# Changing the prefix key binding
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Changing the copy mode binding
unbind '['
unbind ']'
unbind '('
unbind ')'
bind '(' copy-mode
bind ')' paste-buffer -p
bind '[' switch-client -p
bind ']' switch-client -n
# Start indexing windows from 1 instead of 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'dreamsofcode-io/catppuccin-tmux'
set -g @plugin 'tmux-plugins/tmux-yank'
# set vi-mode
set-window-option -g mode-keys vi
# vi copy style
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi S-v send-keys -X rectangle-toggle
bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel
# open panes in current directory
unbind '"'
unbind %
unbind $
unbind *
bind * split-window -v -c "#{pane_current_path}"
bind $ split-window -h -c "#{pane_current_path}"
# Initialize TMUX plugin manager (this line needs to be at the very bottom of the conf file)
run '~/.config/tmux/plugins/tpm/tpm'
# install TPM
# tmux source [conf]
# C-a I
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment