use vim keybindings in copy mode

This commit is contained in:
Thomas Ruoff
2015-07-31 23:00:25 +02:00
parent b31076ceb5
commit b7e635fe69

View File

@@ -17,11 +17,16 @@ unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Copy-paste integration
# Use vim keybindings in copy mode
setw -g mode-keys vi
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
bind y run-shell "tmux show-buffer | xclip -sel clip -i" \; display-message "Copied tmux buffer to system clipboard"
# Setup 'v' to begin selection as in Vim
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
# splitting panes
bind v split-window -h