Skip to content

Instantly share code, notes, and snippets.

@devpilot
Last active September 1, 2022 07:04
Show Gist options
  • Save devpilot/d57456f8de1eb99e726a72fd5dcd31ef to your computer and use it in GitHub Desktop.
Save devpilot/d57456f8de1eb99e726a72fd5dcd31ef to your computer and use it in GitHub Desktop.
tmux configuration file
# Start numbering at 1
set -g base-index 1
# Display message longer
set-option -g display-time 1500
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# Enable mouse mode (tmux 2.1 and above)
set-window-option -g mouse on
# Toggle mouse mode
bind a set-window-option mouse\; display-message "Mouse mode: #{?mouse,on,off}"
# Synchronize panes
bind-key % set-window-option synchronize-panes\; display-message "Pane Sync: #{?pane_synchronized,on,off}"
# vi style keybinding
set-window-option -g mode-keys vi
# pane movement
bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'"
bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'"
# use color terminal for bash
set -g default-terminal xterm-color
# Disable auto rename
set-window-option -g automatic-rename off
# List of plugins
#set -g @plugin 'tmux-plugins/tpm'
#set -g @plugin 'tmux-plugins/tmux-sensible'
#set -g @plugin 'tmux-plugins/tmux-resurrect'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
#run '~/.tmux/plugins/tpm/tpm'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment