Fix Vim + Tmux yank/paste on unnamed register

前端 未结 5 854
北海茫月
北海茫月 2020-12-22 17:59

While using vim inside a tmux session I cannot yank or paste to the unnamed register. Going to a named register works fine, but unnamed never works.

Error is:

<
5条回答
  •  -上瘾入骨i
    2020-12-22 18:24

    To add a couple notes from my experience on OSX to the accepted answer:

    • Make sure you do set clipboard=unnamed and not set clipboard=unnamedplus
    • I had to kill my tmux server ($ killall tmux or $ tmux kill-session -a). Reloading the tmux configuration files showed that default-command was set but did not give vim access to the system clipboard.

提交回复
热议问题