Thursday, May 2, 2024
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 2152  / 1 Year ago, wed, january 4, 2023, 11:56:40

I tried "+y and "*y but both doesn't seem to copy into the primary selection.



Note that vim --version returns -clipboard. Not sure what this means.

Also note that I'm running VIM in a terminal.



So how do I copy text into the Primary Selection in VIM?

Goal is to copy text from VIM into Google Chrome.


More From » command-line

 Answers
0

You need a version of vim that has +clipboard in its version. Install the vim-gnome package and you should be fine. (And you don't have to use gvim to use the clipboard, it still works when running vim in a terminal.)



Note
In more recent versions, the actual package name seems to be vim-gtk and vim-gtk3 respectively (vim-gnome is a dummy package).


[#38519] Wednesday, January 4, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
huovie

Total Points: 234
Total Questions: 99
Total Answers: 105

Location: Central African Republic
Member since Sun, Feb 26, 2023
1 Year ago
huovie questions
Mon, Aug 2, 21, 01:46, 3 Years ago
Thu, Feb 2, 23, 10:58, 1 Year ago
Thu, Oct 21, 21, 08:55, 3 Years ago
Sun, Dec 5, 21, 23:57, 2 Years ago
;