X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/12edf8f6c10bec811e24362d1c8ce879a297ddb0..refs/heads/uh-backup:/tmux.conf diff --git a/tmux.conf b/tmux.conf index 32d4fa3..9f4144f 100644 --- a/tmux.conf +++ b/tmux.conf @@ -1,6 +1,38 @@ set -g default-terminal "screen-256color" -set -g utf8 on set -g set-titles on -set -g mouse-utf8 on -new -s weechat -n weechat weechat +set -g mode-keys vi + +bind-key Escape copy-mode +unbind-key p +bind-key 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 'Space' send-keys -X halfpage-down +bind-key -T copy-mode-vi 'Bspace' send-keys -X halfpage-up + +# extra commands for interacting with the ICCCM clipboard +bind-key C-c run "tmux save-buffer - | xclip -i -sel clipboard" +bind-key C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer" + +# easy-to-remember split pane commands +bind-key | split-window -h +bind-key - split-window -v +unbind-key '"' +unbind-key % + +# moving between panes with vim movement keys +bind-key h select-pane -L +bind-key j select-pane -D +bind-key k select-pane -U +bind-key l select-pane -R + +# moving between windows with vim movement keys +bind-key -r C-h select-window -t :- +bind-key -r C-l select-window -t :+ + +# resize panes with vim movement keys +bind-key -r H resize-pane -L 5 +bind-key -r J resize-pane -D 5 +bind-key -r K resize-pane -U 5 +bind-key -r L resize-pane -R 5