3

I'm using a work computer so i don't have a root access. I've tried "+y, "*y, set clipboard=unnamed. It looks like my vim doesn't support +clipboard (version 7.0). I'm using Linux Centos 5 so fakeclips doesn't actually help (i think)

Please help. It's a pain to type stuff manually from firefox to vim or other apps and vice versa.

1
  • 1
    Just to make sure, vim -> firefox using "+y and then Ctrl-V doesn't work. Neither does firefox -> vim using Ctrl-C and then "+gP ? Sep 13, 2011 at 17:34

3 Answers 3

3

Often times Linux distributions include a vim that does not support X11 or the clipboard. If you have gvim installed, you can run gvim in text mode by running it as

gvim -v

Try that and see if that fixes the problem. If it does, and if you don't want to type gvim -v all the time, you can create an alias,

alias vim='gvim -v'

or a link, e.g.,

ln -s $(which gvim) ~/bin/vim

For that, you'll need your own ~/bin directory and that directory early in your PATH, e.g., by putting

PATH=$HOME/bin:$PATH

in your ~/.profile or ~/.bash_profile if ~/bin is not already in your PATH.

1
  • Sometimes distributions include a /bin/vi, which is a stripped down version of Vim, and then optionally /usr/bin/vim and /usr/bin/gvim, which can have various feature sets enabled depending on the distributor. Often people are invoking Vim as "vi" when they should be typing "vim'.
    – Heptite
    Sep 13, 2011 at 18:28
0

I second the motion to install gvim (and use it).

You may have the DISPLAY variable unset. Fix it by (usually, on the primary X vt:)

export DISPLAY=:0
gvim

If all else fails you may find a workaround in xclip

:'<,'>w !xclip
:w !xclip -selection clipboard
0

I've given up on vim for that. Now i'm using gvim. i guess that's the only solution. Thanks guys

You must log in to answer this question.