Skip to content

Instantly share code, notes, and snippets.

@ugovaretto
Last active May 9, 2023 08:19
Show Gist options
  • Save ugovaretto/2b1f5e47bbc25a9b300c405ffaaa0318 to your computer and use it in GitHub Desktop.
Save ugovaretto/2b1f5e47bbc25a9b300c405ffaaa0318 to your computer and use it in GitHub Desktop.
# Set prefix (Ctrl+a)
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
# Use Alt-arrow keys to switch panes (Alt+left/right/up/down)
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Shift arrow to switch windows (Shft+left/right/up/down))
bind -n S-Left previous-window
bind -n S-Right next-window
# Mouse mode to alter windows
setw -g mouse on
# Change status bar
set -g status-bg cyan
set -g window-status-style bg=yellow
set -g window-status-current-style bg=red,fg=white
# Set easier window split keys
bind-key v split-window -h
bind-key h split-window -v
# Easy config reload
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded."
#Set Tmux plugin to resurrect every time workstation restarted (Ctrl+A Ctrl+S to Save / Ctrl+A Ctrl+R to Resurrect)
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Automatically restore tmux windows when tmux starts.
set -g @continuum-restore 'on'
# Don't auto-launch tmx at machine boot. Give me a chance to gcert first.
set -g @continuum-boot 'off'
# Preserves what was readable in each pane.
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-strategy-nvim 'session'
# 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