简体   繁体   中英

Copying from GVIM to Windows doesn't work

I have both gvim and vim running on my linux machine through vnc. GVIM opens a separate display terminal for each file. I can copy between gvim and vim. Also, from vim to windows. But copying from gvim to windows doesn't work.

I can copy by selecting the text and pasting using right-click. Not very much .vimrc expert, i would appreciate any suggestions.

Is it not your VNC preventing copy/paste from the local and distant machine? I've already seen this kind of behaviour in the past.

Howeaver, in VIM I'd say it's because you have set your mouse to all ( :set mouse=a ) so you loose the copy/paste abilities of your OS so you can select/copy/paste with vim buffer instead.

With gVIM I'm not sure. Have you try do disable the mouse ( :set mouse= ) you should have access to a contextual menu.

(but my #1 guess is about your VNC limitations!)

Select the text using v and moving around. Then yank the text using

" * y

you should be able to paste the text by right clicking the mouse.

Found this on another site and it seems to fix the only being able to copy/paste once from gvim to windows. Close the current vncconfig window and relaunch with polling enabled (time in ms):

vncconfig poll=100 &

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM