On 2012-01-13, Ven Tadipatri wrote: > On Wed, Jan 11, 2012 at 2:39 AM, ConcreteVitamin wrote: > > Following your advice I installed vim-gnome. And problem fixed! > > > > Thanks! :) > > > > > > On Wed, Jan 11, 2012 at 3:26 PM, Gary Johnson wrote: > >> > >> On 2012-01-11, ConcreteVitamin wrote: > >> > Hi All, > >> > > >> > I'm using Vim under Ubuntu's Gnome Terminal (the command "vim"). I > >> > selected > >> > some text in visual mode, then "+y, but when I right clicked on > >> > Firefox's > >> > address bar, the "paste" option is not available. What's the problem? > >> > And how > >> > to fix it? > >> > >> The version of vim that you are using was probably not compiled with > >> support for X11 or the clipboard. You can check this by executing > >> > >> :version > >> > >> Ubuntu has several packages that include vim: > >> > >> package binary X11 > >> --------- ------------------ --- > >> vim /usr/bin/vim.basic No > >> vim-tiny /usr/bin/vim.tiny No > >> vim-gnome /usr/bin/vim.gnome Yes > >> > >> One of these is linked to /usr/bin/vim via /etc/alternatives/vim. > >> You can find out which by executing > >> > >> ls -l /etc/alternatives/vim > >> > >> I think that all you have to do is install the vim-gnome package and > >> you'll get what you want.
> Hmm...I don't know if that's always an option. Sometimes we're on a > machine where we don't have root access, so we don't have the > privileges to reinstall vim. Or admins may decide that there is a > standard version of vim and they don't want to change it. Of course installing a package is not always an option. The OP said he was using Ubuntu, which usually means the computer is personally owned and that the owner can install whatever he wants. With that ability, installing the appropriate package is the best solution. There are other options for other situations. The easiest is to run gvim in terminal mode, as "gvim -v". Since gvim is always built with X11 support, problem solved. This option can be made transparent to the user with an alias: "alias vim='gvim -v'". Another option is to build vim yourself in your home directory. > Telling someone to reinstall vim isn't a solution, it's hiding the > real problem which is why doesn't vim automatically have clipboard > support? Why is it "optional"? Yes, it is a solution. Further, vim _does_ automatically have clipboard support. When I build it myself, with no build options, I get a vim with clipboard support. The real problem is that many Linux distributions choose to build their default vim package without X11 or clipboard support. Note that it takes extra work to do this. This makes no sense to me. Disk space is no longer an issue; RAM is no longer an issue; load time has never been an issue with respect to these features; and these days, nearly everyone who uses vim in a terminal uses an X11 terminal emulator. Yet I find myself answering this question about once a month on this list or in some other forum. If you think clipboard support should not be optional, I suggest you contact the maintainers of at least Ubuntu and Fedora. > So I think if you are on a Windows system, where you don't have the > ability to reinstall vim, how can you do a simple thing like "copy > text from vi and paste it in an external app". If you're using vi from > within a putty terminal, putty has copy and paste built into it I > believe. Any other suggestions? Most users of Vim on Windows use gvim, which always supports the Windows clipboard. Are you having problems copying from vim on Windows? Please don't top-post in this list. 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
