Thursday, September 16, 2010

Re: Clipboard functionality on Unix/Windows

On 2010-09-16, Ven Tadipatri wrote:
> So after struggling for a while trying to integrate vi with the system
> clipboard, I figured it out, and thought I might share it with others
>
> On Windows (from cygwin):
> vmap <C-c> :<Esc>`>a<CR><Esc>mx`<i<CR><Esc>my'xk$v'y!cat >/dev/clipboard<CR>u
>
> On Linux machines (if you have xclip):
> vmap <C-c> :<Esc>`>a<CR><Esc>mx`<i<CR><Esc>my'xk$v'y!xclip -selection c<CR>u

If you have to do all that to copy from vim to the clipboard, your
system is not properly configured. It may be that the vi or vim
you're using was not built with support for X11 or the
xterm_clipboard. Some distributions come with a "vi" that is the
tiny version of Vim, without support many features at all, and "vim"
is often built without support for X11. Try running Vim in a
terminal as "gvim -v". That will use the gvim binary, which does
have X11 support, but in console mode.

Regards,
Gary

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