Created
November 17, 2017 08:57
-
-
Save disktnk/2075bc74fbc5f079657d742b808e2993 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g prefix 'C-\' | |
unbind C-b | |
# enable mouse operation | |
set-option -g mouse on | |
# enable copy mode when scroll-up | |
bind-key -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'" | |
# unable coy mode on end of scroll | |
bind-key -n WheelDownPane select-pane -t= \; send-keys -M | |
#Command Sequence for Nested Tmux Sessions | |
bind-key a send-prefix | |
#Aggressive Resize | |
setw -g aggressive-resize on | |
# use vi-key bind on copy mode | |
setw -g mode-keys vi | |
# 'v' start select | |
bind-key -T copy-mode-vi v send -X begin-selection | |
# 'y' or 'Enter' use copy-pipe-and-cancel | |
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "win32yank.exe -i" | |
unbind -T copy-mode-vi Enter | |
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "win32yank.exe -i" | |
# enable mouse drag for copy-pipe-and-cancel | |
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "win32yank.exe -i" | |
# <prefix> p pastes from clip board | |
unbind-key -T prefix p | |
bind-key p run "win32yank.exe -o | tmux load-buffer - && tmux paste-buffer" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment