From db89cbb43eac819ab2158b1f365f1aa35f0e5612 Mon Sep 17 00:00:00 2001 From: Zach Evans Date: Sun, 10 Aug 2014 00:21:25 -0400 Subject: [PATCH] copy and paste for tmux --- tmux/tmux.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tmux/tmux.conf b/tmux/tmux.conf index 02cbd0e..d420487 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -72,6 +72,17 @@ set -g status-justify centre #Enable vi keys. setw -g mode-keys vi +#Use vim keybindings in copy mode +setw -g mode-keys vi + +#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" + #Set rename off so pane min/max'ing works set-window-option -g allow-rename off