You are not logged in.

#1 2022-07-10 23:20:25

strangechange
Member
Registered: 2017-03-06
Posts: 41

[solved] Vim Clipboard

Hello,
I want to use vim but I get every time annoyed that the clipboard doesn't behave like I want it to.
Just typing y only copies the text to the internal buffer in vim and not to the clipboard.
In vim Strg + C and Strg + V are not commands.
I read there are 2 clipboards, the + and the * clipboard unnamedplus and unnamed.
I use gnome.
The clipboards don't seem to be accessible in gnome. Something like "+y or "*y or some very difficult to type ctrl + ... doesn't seem to work.
Do you have some easy way to get started?
Thanks.

Last edited by strangechange (2022-07-11 18:51:18)

Offline

#2 2022-07-10 23:21:59

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,411

Re: [solved] Vim Clipboard

Have you found this : https://wiki.archlinux.org/title/clipboard  ?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2022-07-11 00:48:53

Adriik
Member
From: Argentina
Registered: 2022-03-10
Posts: 134

Re: [solved] Vim Clipboard

About clipboard on vim: https://wiki.archlinux.org/title/Vim#Clipboard

vim --version shows what features vim has. You need the "+clipboard" feature.

The easy way is installing gvim.


Solo soy un loco más. Please use [code] [/code] tags.
Command cheatsheetCommand not found?
If I write something wrong in English, please correct me.

Offline

#4 2022-07-11 18:51:02

strangechange
Member
Registered: 2017-03-06
Posts: 41

Re: [solved] Vim Clipboard

Adriik, that helped me. I deinstalled vim and installed gvim and changed my .vimrc in /home/USERNAME to

set clipboard=unnamedplus

Now I can copy with y and paste with p in vim and strg+c, strg+v in gnome as I wanted it.

VI IMproved 9.0 is the version.

ewaller I may have read something about clipboards before.
I may think about a clipboardmanager from your link at a later time.

Offline

#5 2022-07-14 09:10:39

Henry78
Member
From: Vienna
Registered: 2012-01-23
Posts: 65

Re: [solved] Vim Clipboard

Or select the text use Shift-Strg-V / Shift-Strg-C to leverage the Terminal copy to clipboard. Of course this does not copy from vim's buffer, only the selected text.

I use this regularly on "foreign" installations I have to work with and where i can't mess with vim settings.

Offline

#6 2022-07-14 16:25:02

strangechange
Member
Registered: 2017-03-06
Posts: 41

Re: [solved] Vim Clipboard

edit: posted in the wrong topic

Last edited by strangechange (2022-07-15 22:30:30)

Offline

Board footer

Powered by FluxBB