> "Copy contents of System Clipboard to + buffer when entering vim
> 
> autocmd VimEnter * call setreg('+', system('xsel -ob')) 
> 
> "Copy contents of + buffer to System Clipboard while leaving vim
> 
> autocmd VimLeave * call system("xsel -ib", getreg('+'))
> 
> 
> 
> This should solve your problem and also the problem of vim "+" buffer 
> contents not being availble to System Clipboard when vim is exited.
> 
> 
> 
> Note: Thanks to @Raimondi at #vim for helping me with the solution.

This indeed solves the clipboard issue, but using this minimal vimrc:

set nocompatible
set clipboard=unnamedplus
autocmd VimEnter * call setreg('+', system('xsel -ob')) 
autocmd VimLeave * call system("xsel -ib", getreg('+')) 


And then running for example vim some_empty_file

The statusline becomes this:

"some_empty_file" [New File]^[[2;2R^[[>1;2802;0c 

Notice the garbage text next to [New File]. Also, starting vim without a file 
can also add the same garbage text in the first line.

At this point this might belong to [email protected]. It's true that a patch 
introduced this issue, but if we can fix it with vimrc, then I don't think 
vim_dev is the ideal place.

Thank you!

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui