Friday, January 11, 2013

Re: Cannot paste yanked text after terminal vim is suspended

On Friday, January 11, 2013 2:34:24 AM UTC+1, Tim Chase wrote:
>
> 4) spawn xclip to manage the selection/clipboard buffers
>

I actually forgot that I had a workaround for the issue (!?):

" work-around to copy selected text to system clipboard
" and prevent it from clearing clipboard when using ctrl + z (depends on xsel)
function! CopyText()
normal gv"+y
:call system('xsel -ib', getreg('+'))
endfunction
vmap <leader>y :call CopyText()<cr>

And also I have set clipboard to unnamedplus:

" use X11 clipboard for yank and paste
set clipboard=unnamedplus


Anyway, I wonder if there is a better way to solve this problem without depending on xsel?


--
Dalibor Nasevic
http://dalibornasevic.com

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

No comments: