From a180f60a982b50ea031beb97dd25a2b3a3923040 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Sun, 26 Aug 2018 17:35:48 +0100 Subject: [PATCH] Enable vi-mode yank on macOS --- .conduit.yaml | 1 + tmux.conf | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.conduit.yaml b/.conduit.yaml index 7498eaa..f68f31c 100644 --- a/.conduit.yaml +++ b/.conduit.yaml @@ -5,5 +5,6 @@ - xsel - brew: - tmux + - reattach-to-user-namespace - symlink: - {src: tmux.conf, dst: ~/.tmux.conf} diff --git a/tmux.conf b/tmux.conf index 6d643c0..b329214 100644 --- a/tmux.conf +++ b/tmux.conf @@ -71,7 +71,8 @@ bind-key C-u copy-mode -u # Begin selection in copy mode with v not Space bind-key -T copy-mode-vi v send-keys -X begin-selection # Yank to the system clipboard in copy mode -if -b '[ "`uname`" = "Linux" ]' \ +if -b '[ "`uname`" = "Darwin" ]' \ + "bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'" \ "bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xsel -i -p && xsel -o -p | xsel -i -b'" # Left status style