Home:ALL Converter>vim -- copy to system clipboard in OpenSuSE

vim -- copy to system clipboard in OpenSuSE

Ask Time:2010-08-03T03:21:07         Author:gatoatigrado

Json Formatter

I've tried the methods mentioned at Vim: copy selection to OS X clipboard, but neither the * or + register seem to be working for me. I'm on OpenSuSE 11.3, and have vim and vim-data installed (there is no vim-full package as mentioned in the link in SuSE). I've tried with Klipper enabled and disabled. (edit) I've also tried pasting with ctrl+v and middle click.

Thanks in advance.

Author:gatoatigrado,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/3391035/vim-copy-to-system-clipboard-in-opensuse
Dummy00001 :

I presume that you are running VIM in terminal and talk about VIM's visual selection, not selection with the mouse in terminal window.\n\nSince in your case VIM isn't aware of the X, it obviously cannot communicate your selection to the X Window System. If you select something in terminal window with mouse, then you are selecting not in VIM, but in the terminal emulator which is aware of the X and communicates properly the current selection to X's clipboard.\n\nYou can try to play around with xsel tool which allows one to access the X clipboard from command line. You would need to override the usual clipboard shortcuts to not only put the content of the visual selection into the usual VIM register(s), but also to pipe it to the xsel so that it becomes the new X selection. (Strangely enough, I do not have the xsel installed on the SLES10 system I have right now at hand.) That obviously would only work if (1) the terminal is running locally or (2) remote server you are connected to allows the X forwarding. If the X forwarding is disabled on the server where you edit the files, then you have no chance to do in VIM: only selecting with mouse in terminal window would work.",
2010-08-03T14:26:10
0fnt :

See if you have something called vimx, an X enabled version of vim. You can alias vim to that, and then use * register. \n\nThis is a superuser question. ",
2010-08-03T14:28:33
yy