Skip to content

Instantly share code, notes, and snippets.

@micdillon
Last active September 23, 2024 22:11
Show Gist options
  • Select an option

  • Save micdillon/39745cfe32d943efe49146370e53829e to your computer and use it in GitHub Desktop.

Select an option

Save micdillon/39745cfe32d943efe49146370e53829e to your computer and use it in GitHub Desktop.
# Change the prefix to C-a from C-b
set -g prefix C-a
unbind C-b
# Set the delay between prefix and command
set -s escape-time 1
# Set the base index for windows to 1 instead of 0
set -g base-index 1
# Set the base index for panes to 1 instead of 0
setw -g pane-base-index 1
# Automatically renumber windows when a window is closed.
set -g renumber-windows on
# Configure the status bar.
set -g status-left-length 50
set -g status-left "[#S]"
set -g status-justify centre
set -g status-left-length 50
# Reload .tmux.conf
bind r source-file ~/.tmux.conf \; display "~/.tmux.conf reloaded!"
# Ensure that we can send C-a to other apps
bind C-a send-prefix
# Splitting panes with | and -
bind | split-window -h
bind - split-window -v
# Ahhh, vimmy
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Move between windows
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# Resizing panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Turn on the mouse
set -g mouse off
# Set the default terminal
set -g default-terminal "screen-256color"
# Set the status line's colors
set -g status-style fg=colour231,bg=colour238
# enable vi keys.
setw -g mode-keys vi
# needed for neovim autoread
set -g focus-events on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment