Closed ParadoxZW closed 4 years ago
I want to copy the code that I wrote in vim with wsl-terminal to the Windows clipboard, but I don't know how to do? please help me. 'Cause vim has number, so the Shift-Insert way is helpless.
Copy/Paste doesn't work for me when I start vim from vim.exe. If you start "open-wsl -l" and type vim copy/paste works fine with the following line in ~/.vimrc
" make yank copy to the global system clipboard (windows)
set clipboard=unnamed
Then you can for example paste the windows clipboard with p. You can normally yank (copy) with y.
you need to setup a xserver for this to work properly. UPDATE: the xserver is required only when working with tmux
with bash/zsh and vim:
set clipboard^=unnamed,unnamedplus
is enough
鼠标选中再CTRL+Insert的方法会把vim的行号也复制进去,关行号太麻烦,而且鼠标没法选中超过两页的代码,请问一下要怎么解决啊?