昨日、MacOS Sierra にアップグレードしたところ、tmux + neovim セットアップでクリップボード機能が壊れてしまいました。
動作は次のとおりです。
- 標準の ctrl+c、ctrl+p を使用して、システム <-> vim 間でコピー/貼り付けできます
- tmux セッションでない場合、2 つの VIM インスタンス間でヤンク/ペーストできます
- tmux セッション中に 2 つの VIM インスタンス間でヤンク/ペーストできません
tmux セッション内で vim でクリップボードを使用すると、次の vim エラーが発生します。
clipboard: error:
私の.vimrc
は巨大ですが、関連性があると思われるものは次のとおりです。
set clipboard=unnamed
私の.tmux.conf
場合(簡潔にするために切り捨てられています):
set -g prefix ` # use tilde key as prefix
bind ` send-key ` # insert tilde by pressing twice
set -g history-limit 100000 # set buffer size
set -s escape-time 0 # fix escape key in vim
set -g allow-rename off # keep window names static
set -g default-terminal "screen-256color" # set the TERM to 256 colors
set -g base-index 1 # start window count at 1
set -g pane-base-index 1 # start pane count at 1
set -g default-shell $SHELL # use zsh as shell
編集:これは、ここで報告されたバグに関連しているようです:
https://github.com/tmux/tmux/issues/543
https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/issues/53