dotfiles/tmux/.tmux.conf
2023-07-11 18:40:14 -07:00

40 lines
913 B
Bash

# remap prefix from 'C-b' to 'C-w'
unbind C-b
set-option -g prefix C-w
bind-key C-w send-prefix
# Vim window split commands
bind v split-window -h
bind s split-window -v
unbind '"'
unbind %
# Enable mouse mode
set -g mouse on
# Switch panes with vim keybindings
bind k selectp -U
bind j selectp -D
bind h selectp -L
bind l selectp -R
# Move panes with vim keybindings
bind C-k resize-pane -U
bind C-j resize-pane -D
bind C-h resize-pane -L
bind C-l resize-pane -R
# Move pane to the far right/left/bottom/top
# Source: https://superuser.com/questions/1601701/tmux-how-to-move-current-pane-to-far-left-right-up-down-like-in-vim
bind H splitw -fhb \; swapp -t ! \; killp -t !
bind L splitw -fh \; swapp -t ! \; killp -t !
bind J splitw -fv \; swapp -t ! \; killp -t !
bind K splitw -fvb \; swapp -t ! \; killp -t !
# Vim quit key
bind q killp
unbind x
# Disable auto renaming panes
set -g allow-rename off