Created
January 9, 2021 16:22
-
-
Save wetherc/9fb4adf6f278446c27df429eb6de78fc to your computer and use it in GitHub Desktop.
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
set-option -g default-terminal screen-256color | |
# History | |
set -g history-limit 10000 | |
# Window numbers from 1, not from 0, renumber if closed | |
set -g base-index 1 | |
set-option -g renumber-windows on | |
# Quick Escape (for vim) | |
set -s escape-time 0 | |
# Change the default prefix so I can do other shenanigans | |
# Just remap from Ctrl + b to Alt + b | |
unbind C-b | |
set-option -g prefix M-b | |
bind-key M-b send-prefix | |
# Terminate pane or window | |
# | |
# Oh, oops, this conflicts with exiting emacs | |
# so we'll put that on hold for a hot sec... | |
# bind-key -n C-x confirm-before "kill-pane" | |
# bind-key -n C-X confirm-before "kill-window" | |
# Ctrl + v to split vertically | |
bind-key -n C-v split-window -h -c "#{pane_current_path}" | |
# Ctrl + b to bisect horizontally | |
bind-key -n C-b split-window -v -c "#{pane_current_path}" | |
# Ctrl + Arrow keys navigate panes | |
bind-key -n C-Up select-pane -U | |
bind-key -n C-Left select-pane -L | |
bind-key -n C-Down select-pane -D | |
bind-key -n C-Right select-pane -R | |
# Ctrl + Shift + Arrow keys move panes | |
bind-key -n "C-S-Up" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -U; tmux swap-pane -t $old' | |
bind-key -n "C-S-Left" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -L; tmux swap-pane -t $old' | |
bind-key -n "C-S-Down" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -D; tmux swap-pane -t $old' | |
bind-key -n "C-S-Right" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -R; tmux swap-pane -t $old' | |
# Alt + Arrow keys resize panes | |
bind-key -n "M-Up" resize-pane -U | |
bind-key -n "M-Left" resize-pane -L | |
bind-key -n "M-Down" resize-pane -D | |
bind-key -n "M-Right" resize-pane -R |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment