I recently started using VcXsrv with the hope of being able to grab text from
vim (console mode) to the Windows clipboard via X11 forwarding (and the
* register). It works...to an extent. As soon as I paste to Notepad, I lose the ability to yank to the Windows clipboard.
- I'm experiencing this issue whether I yank text to the
*register directly, or use the
autoselectclipboard option. (
- It doesn't appear to be tied to a specific Xserver: I've tried VcXsrv, XMing, and MobaXterm (including PuTTY w/ Moba's X Server).
- It doesn't appear to be tied to the terminal I'm using. I've tried PuTTY and MobaXterm.
xclipcan be used any number of times outside of
vimwith no issues.
- Echoing a command to
xclipseems to temporarily fix the problem. I can successfully copy yank to
vimagain, but as soon as I paste to the Windows notepad, the problem is back.
- I use
tmuxregularly, but experience this problem outside of a session as well.
- Happens with
$ cat ~/.vimrc " Default vimrc file, installed by vim spell set mouse=a set nocompatible set backspace=indent,eol,start " set autoindent " set smartindent set cindent set tabstop=4 set shiftwidth=4 set expandtab set ruler set showcmd colorscheme elflord syntax enable if &term =~ "^screen" set ttymouse=xterm endif filetype plugin on
$ vim --version | head -20 VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Jul 12 2010 02:29:33) Included patches: 1-445 Modified by firstname.lastname@example.org Compiled by email@example.com Huge version with GTK2 GUI. Features included (+) or not (-): +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +cryptv +cscope +cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra +perl +postscript +printer +profile +python +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white +tcl +terminfo +termresponse +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim +xsmp_interact +xterm_clipboard -xterm_save
:echo @* will show the contents of the
* register properly even after the bug manifests, so it appears that it's not arriving in the Windows clipboard via my X servers for some reason.