commit ed4f5783e939e2d227966fca1642dbf318fbde5a
parent 9cc9027c9dea25be5418a23b05f480e50341933b
Author: MichaĆ M. Sapka <michal@sapka.me>
Date: Mon, 4 Jul 2022 12:29:07 +0200
feat(tmux): vim pane managment
Diffstat:
1 file changed, 23 insertions(+), 0 deletions(-)
diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf
@@ -1,8 +1,25 @@
set -g default-terminal "xterm-256color"
+set-option -g repeat-time 0 # always use prefix key
# vi mode
setw -g mode-keys vi
+# vim-like pane switching
+bind -r k select-pane -U
+bind -r j select-pane -D
+bind -r h select-pane -L
+bind -r l select-pane -R
+
+# Moving window
+bind-key -n C-S-Left swap-window -t -1 \; previous-window
+bind-key -n C-S-Right swap-window -t +1 \; next-window
+
+# Resizing pane
+bind -r C-k resize-pane -U 5
+bind -r C-j resize-pane -D 5
+bind -r C-h resize-pane -L 5
+bind -r C-l resize-pane -R 5
+
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
@@ -13,5 +30,11 @@ set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'egel/tmux-gruvbox'
set -g @tmux-gruvbox 'dark' # or 'light'
+# look and feel
+set -g pane-active-border-style fg=colour166,bg=default
+#set -g window-style fg=colour10,bg=default
+set -g window-active-style fg=colour12,bg=default
+set-option -g history-limit 64096
+
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'