From 855e7bade9ac7f8bdccdb3e06cf91907721899cf Mon Sep 17 00:00:00 2001 From: Tyler Davis Date: Tue, 22 Sep 2020 12:05:50 -0700 Subject: tmux: add vim keys --- .tmux.conf | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to '.tmux.conf') diff --git a/.tmux.conf b/.tmux.conf index 93fe802..e928484 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -5,6 +5,11 @@ set -sg escape-time 10 set -g default-terminal "tmux-256color" set -ga terminal-overrides ",xterm-termite:Tc" +set -g base-index 1 +setw -g pane-base-index 1 + +### VIM RELEVANT KEYBINDINGS + # VI keybindings set -g mode-keys vi set-window-option -g mode-keys vi @@ -14,3 +19,28 @@ bind P paste-buffer bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi y send-keys -X copy-selection bind-key -T copy-mode-vi r send-keys -X rectangle-toggle + +#Mouse works as expected +set -g mouse on + +setw -g monitor-activity on +set -g visual-activity on + +set -g mode-keys vi +set -g history-limit 10000 + +# moving between panes with vim movement keys +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + +# moving between windows with vim movement keys +bind -r C-h select-window -t :- +bind -r C-l select-window -t :+ + +# resize panes with vim movement keys +bind -r H resize-pane -L 5 +bind -r J resize-pane -D 5 +bind -r K resize-pane -U 5 +bind -r L resize-pane -R 5 -- cgit v1.2.3