从 vim 复制到两个 X11 剪贴板

rwo*_*wos 6 vim x11

据我所知,使用 VIM 我可以选择

  • set clipboard=unnamed - 拉到 X11 的主要选择缓冲区(鼠标中键粘贴)

  • set clipboard=unnamedplus- 猛拉到 X11 的剪贴板缓冲区(大多数 GUI 应用程序中的 Ctrl-V 粘贴)

有没有办法让它做在同一时间?

我通常使用鼠标中间粘贴,但这并不适用于任何地方,所以我希望我的选择也可以在剪贴板缓冲区中使用。

(我知道我可以做,"+y但我想自动拥有)

Ing*_*kat 5

对于猛拉,Vim支持设置 unnamedunnamedplus

:set clipboard=unnamed,unnamedplus
Run Code Online (Sandbox Code Playgroud)

来自:help clipboard-unnamedplus

      When "unnamed" is also included to the
      option, yank operations (but not delete, change or
      put) will additionally copy the text into register
      '*'.
Run Code Online (Sandbox Code Playgroud)