Created
October 11, 2019 13:39
-
-
Save ajkerrigan/da42cbfa4bd574e56a1b00f8b7f3b85c to your computer and use it in GitHub Desktop.
My tmux.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unbind-key C-b | |
set-option -g prefix C-a | |
bind-key a send-prefix | |
# Pane Controls | |
# | |
# Everything revolves around vim directional keys: h/j/k/l | |
# | |
# <prefix>-<direction>: Resize pane one row/col at a time | |
# <prefix>-shift-<direction>: Resize by 5 rows/cols at a time | |
# C-<direction>: Move between panes and vim splits (from vim-tmux-navigator) | |
bind-key -T prefix -r -n h resize-pane -L | |
bind-key -T prefix -r -n j resize-pane -D | |
bind-key -T prefix -r -n k resize-pane -U | |
bind-key -T prefix -r -n l resize-pane -R | |
bind-key -T prefix -r -n H resize-pane -L 5 | |
bind-key -T prefix -r -n J resize-pane -D 5 | |
bind-key -T prefix -r -n K resize-pane -U 5 | |
bind-key -T prefix -r -n L resize-pane -R 5 | |
# Visual cue so I don't always mix up horizontal/vertical splits | |
bind-key | split-window -h -c "#{pane_current_path}" | |
bind-key - split-window -v -c "#{pane_current_path}" | |
# Use pane titles as short status notes which display in "choose-tree", and add | |
# a binding to toggle displaying pane titles in a border | |
bind-key -T prefix . command-prompt -p "(rename-pane)" -I "#{pane_title}" "select-pane -T '%%'" | |
bind-key -T prefix P run-shell 'zsh -c "arr=( off top ) && tmux setw pane-border-status \${arr[\$(( \${arr[(I)#{pane-border-status}]} % 2 + 1 ))]}"' | |
# I use window and pane titles to help remember what the hell I was doing or thinking | |
# when I was last in a pane. Tmux, please don't rename them. | |
setw -g automatic-rename off | |
# Hack to access VisiData's man page more easily | |
bind-key C-h send-keys 'C-h' | |
bind-key -T prefix t select-layout even-vertical | |
bind-key C-a last-window | |
bind C-l send-keys 'C-l' | |
bind-key s choose-tree -Z | |
set -g repeat-time 5000 | |
# Useful plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'tmux-plugins/tmux-copycat' | |
set -g @plugin 'tmux-plugins/tmux-yank' | |
set -g @plugin 'christoomey/vim-tmux-navigator' | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @plugin 'tmux-plugins/tmux-continuum' | |
# Plugin options | |
set -g @resurrect-save-shell-history off | |
set -g @resurrect-capture-pane-contents on | |
set -g @continuum-save-interval '15' | |
set -g @continuum-restore 'on' | |
# Tmuxline | |
if-shell "test -f ~/.tmux/tmuxline.snapshot" "source ~/.tmux/tmuxline.snapshot" | |
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |
run -b '~/.tmux/plugins/tpm/tpm' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment