6

If I copy text into the xterm clipboard ("+y) from gvim, it is cleared when I exit gvim.
How do I prevent this?

I've found the solution for vim, but it doesn't work for Gvim:

autocmd VimLeave * call system("echo -n $'" . escape(getreg(), "'") . "' | xsel -ib")

https://superuser.com/questions/299419/prevent-vim-from-clearing-the-clipboard-on-exit

marked as duplicate by Martin Tournoij Dec 17 '15 at 14:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.