X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/f16de7431fd833edcf6d536784151a72b477ecc7..08fdc4cadb4690de4b3ab1c9985efe50f8065252:/tmux/tmux.conf diff --git a/tmux/tmux.conf b/tmux/tmux.conf new file mode 100644 index 0000000..9f4144f --- /dev/null +++ b/tmux/tmux.conf @@ -0,0 +1,38 @@ +set -g default-terminal "screen-256color" +set -g set-titles on + +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