Saturday, August 3, 2019

Persist Clipboard after Exiting Vim

Is there a way to prevent the clipboard buffer from being cleared upon exit?

I am using the 'gvim' package on Archlinux. My terminal is suckless st.

The behavior I'm looking for is to use the system clipboard for yank, etc. procedures. I have achieved this by putting 'set clipboard=unnamedplus' in my config file. This puts yanked content into my system clipboard where I can Ctrl (+ Shift) + V the content anywhere else in my window-space, until I close Vim, at which point the buffer gets cleared.

I have noticed that paste 'p' still works between Vim files after closing, which makes it seem like the content is still in the buffer, but then why isn't it accessible via Ctrl (+ Shift) + V?

An example of use: take content from a Vim file and paste it into another application.


MCP

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CADzJjDQ6oOzMfwR_-DXRT7XUTEcsiQ2H6vPjFYs%2BmfTzRLXboA%40mail.gmail.com.

No comments: