Skip to content

Instantly share code, notes, and snippets.

@rfdonnelly
Created July 15, 2020 19:01
Show Gist options
  • Save rfdonnelly/1916fc6bb41739eb1359c13cb4505d61 to your computer and use it in GitHub Desktop.
Save rfdonnelly/1916fc6bb41739eb1359c13cb4505d61 to your computer and use it in GitHub Desktop.
tmux.conf
# act like screen
set -g prefix C-a
unbind C-b
bind a send-prefix # allow 'C-a a' to send C-a to application
bind C-a last-window # allow 'C-a C-a' to switch to last window
# vi key bindings
set-window-option -g mode-keys vi
set-option -g status-keys vi
# colors
set -g default-terminal "screen-256color"
# FIXME up/down-pane commands have been deprecated in tmux 1.9
# bind-key k up-pane
# bind-key j down-pane
# bind-key h up-pane
# bind-key l down-pane
# vim style pane resizing
bind-key + resize-pane -U 10
bind-key - resize-pane -D 10
bind-key < resize-pane -L 20
bind-key > resize-pane -R 20
# screen style window renaming
# until we have time for a better way
# rename is done from $PROMPT_COMMAND
set-window-option -g automatic-rename off
set-option -g set-titles on
# status line
set-option -g status-right "%Y-%m-%d %H:%M:%S"
set-option -g status-bg colour235 # dark gray
set-option -g status-fg colour243 # light gray
set-option -g window-status-current-fg colour250 # lighter gray
# Renew environment variables
# https://babushk.in/posts/renew-environment-tmux.html
set-option -g update-environment "SSH_AUTH_SOCK SSH_CONNECTION DISPLAY"
# Tmux Plugin Manager
# https://github.com/tmux-plugins/tpm
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-copycat'
# Initialize tpm
run '~/.tmux/plugins/tpm/tpm'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment