From 9726f7c32a1a22792f8a907a41a300700f28c84d Mon Sep 17 00:00:00 2001 From: Random936 Date: Tue, 11 Jul 2023 18:40:14 -0700 Subject: [PATCH] Added .tmux.conf --- tmux/.tmux.conf | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tmux/.tmux.conf diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf new file mode 100644 index 0000000..87c1b75 --- /dev/null +++ b/tmux/.tmux.conf @@ -0,0 +1,39 @@ +# 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