Copying text from gvim editor to system clipboard works only once per session

308 views Asked by At

I have pulled out information on using system clipboard on gvim and figured out that "+" AND "*" register is shared between windows and gvim application. These works fine when copying from windows to gvim. When I copy text from windows, both registers are updated.

However, I am facing a peculiar issue where the first time I copy text from gvim to "+" register it updates the windows system clipboard. When I try copying another piece of text during the same gvim session it is updated in the "+" register of gvim but the copied text is not reflected in my windows system clipboard. Instead the text copied initially is still maintained. In other words, the windows system clipboard value is locked to the first copied text during a gvim session and is never updated thereafter.

This issue occurs with the "*" register as well. The yank works only the first time. I suspect there is some kind of conflict between the two registers.

Has anyone faced an issue as this in gvim where "+" OR "*" register is updated but text pasted in windows is same as the first yanked text? How do I find out whether system clipboard has been updated when I yank to "+" register in gvim?

1

There are 1 answers

0
mMontu On

My clipboard works fine on gVim under ms-windows -- you probably have an issue with the 'clipboard' option. Vim FAQ 36-10 lists several related subjects on the docummentation:

'clipboard'
x11-selection
clipboard
'go-a'
'mouse'
xterm-copy-paste
09.3

The last item (09.3) references the user manual, and the explanations there may help you to understand the details on the other referenced subjects.

Beyond those, will you probably want to check :help gui-clipboard.