From c76551c14ff5cfb111b43ff853970c02e5a94762 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Sat, 17 Dec 2016 09:34:49 +0100 Subject: [PATCH] [tmux] fix lost access to clipboard First noticed the issue when pasting from the system clipboard stopped working in vim (only when running inside a tmux session). The fix is in the following Stack Overflow answer: http://stackoverflow.com/a/40154047 The necessary wrapper used by the fixed is at: https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard The wrapper can be installed on the Mac with: brew install reattach-to-user-namespace --- tmux.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tmux.conf b/tmux.conf index 774ecda..7fbc5b6 100644 --- a/tmux.conf +++ b/tmux.conf @@ -35,6 +35,11 @@ setw -g automatic-rename on # automatically rename windows setw -g mouse on # enable mouse support setw -g pane-base-index 1 # start pane numbering from 1 +# Fix for clipboard in vim running inside tmux: +# See http://stackoverflow.com/a/40154047 +# See https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard +set -g default-command "reattach-to-user-namespace -l $SHELL" + # # Status bar #