Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Sep 13 '11 at 17:09

This question came from our site for professional and enthusiast programmers.

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 ? –  Sudipta Chatterjee Sep 13 '11 at 17:34

3 Answers 3

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

share|improve this answer

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
share|improve this answer

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.

share|improve this answer
    
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 '11 at 18:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.