2

I have being trying to get crtl + V to select all lines of text and then using "+y and "*y but that doesn't seem to work when I try to paste into the forum.

Additionally, I have been to this post and tried changing Vims /.vimrc with the un-named clipboard option but that hasn't worked either.

How can I copy from Vim into a forum post without doing shift + crl + c and then having to remove the line numbers?

Community
  • 1
  • 1
dustin
  • 4,309
  • 12
  • 57
  • 79
  • I don't know which browse do u use. Firefox I have its all text. Chrome I have textAid installed. so that I can edit textarea with my gvim. also don't care about the paste problem... :) – Kent Mar 31 '13 at 20:09
  • @Kent I am using Firefox. – dustin Mar 31 '13 at 20:10
  • 1
    `ctrl+v` enables the block wise selection. Haven you mistaken it for `shift + v`? – TKrugg Mar 31 '13 at 20:38

1 Answers1

5
  1. Make sure you are using a proper Vim build. The default Vim on most (if not all) Linux distributions is a "tiny" build that lacks clipboard support among other interesting features. You can verify that by running this command in your terminal emulator:

    $ vim --version | grep clipboard
    

    A + in front of a feature means that it's built-in, a - means that the feature is missing.

  2. If your Vim has no clipboard support, you should consider upgrading it to a proper build. On debian-based systems, this is typically done with this command:

    $ sudo apt-get install vim-gnome
    

    At this point, you should be able to use "+y and experiment with :h 'clipboard.

However, this works only if your Vim runs locally. If you are using Vim on a remote machine, you can't have remote Vim talk to local clipboard unless you use the -X flag upon connection to enable "X11 forwarding" which comes with a variety of side effects and requirements.

romainl
  • 186,200
  • 21
  • 280
  • 313