On 01/10/13 17:16, Dalibor Nasevic wrote:
I'm using Ubuntu and terminal Vim. I have this workflow that I
would yank something in Vim, suspend it (ctrl+z) and then paste
the yanked text from clipboard. The problem is that this does not
work. It works only if I paste in another terminal on any other
place, but once vim is suspended it does not work anymore.

I guess it's an OS related issue, but I wonder if anyone else is
experiencing it and if there is any workaround with vim registers
/ Ubuntu clipboard?

I presume you're using the selection register

  :help quotestar

instead of the clipboard register

  :help quoteplus

In my experimenting, the clipboard register (what is accessed in other applications by the copy/cut/paste menus) is available even when Vim is suspended; while the selection register needs to have the providing application (your vim process where you did the selection) running at the time of pasting. As you surmise, I believe this is an OS-level thing. Workarounds include:

 1) use the clipboard register instead

2) possibly pasting the selection-register contents once (with middle-mouse) in another application and then pasting again. I had some mixed success with the receiving application running and the initial vim process suspended

 3) transfer via another mechanism such as a temp file or pipe.

 4) spawn xclip to manage the selection/clipboard buffers

Personally, I tend to just use the clipboard register for just about everything and mostly ignore the selection register.

-tim





--
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

Reply via email to