How to “copy to clipboard” in vim of Bash on Windows?

前端 未结 9 1015
执念已碎
执念已碎 2020-12-13 00:38

I used to use \"+y to copy text to system\'s clipboard, but it doesn\'t work in vim of Bash on Windows.

9条回答
  •  抹茶落季
    2020-12-13 01:37

    If you want use vim that bundled within WSL, you can only use the Clipboard provided by vim itself, which means you can only copy & paste within vim only.

    Or, you can try:

    1. Install VcXsrv and run it.
    2. export DISPLAY=localhost:0 in your WSL Bash.
    3. Run vim-gtk or vim-gnome(or any other GUI Apps) and try Clipboard across Linux and Windows.

提交回复
热议问题