You are not logged in.

#1 2017-08-17 15:11:44

nachopro
Member
Registered: 2013-08-23
Posts: 78

["SOLVED"] New system and VIM issue

Hi, this is a ultra newbie issue.

I'm using vim in a fresh Arch system. I use this computer via SSH and I cant copy with mouse selection nor paste with middle button like I do in the rest of my Arch/Debian/Gentoo systems that I frecuently access.

PS: This computer haven't X installer.

I'm using :set mouse=r when I open vim, but it is not persisten. (i tried with ~/.vimrc - /etc/vimrc - /usr/share/vim/vimfiles/archlinux.vim without success)

Some suggestion?

Last edited by nachopro (2017-08-19 01:08:28)

Offline

#2 2017-08-17 15:31:36

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: ["SOLVED"] New system and VIM issue

See https://wiki.archlinux.org/index.php/Vim#Clipboard

Note that for the clipboard feature you need the gvim package installed instead of the vim package - though you can still use console vim, you don't need to actually use graphical vim.

Last edited by Chazza (2017-08-17 20:06:44)

Offline

#3 2017-08-17 16:16:59

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: ["SOLVED"] New system and VIM issue

Chazza wrote:

See https://wiki.archlinux.org/index.php/Vim#Clipboard

Note that for the clipboard feature you need the gvim package installed instead of the vim package - though you can still use console vim, you don't need to actually use graphical vim.

I don't think this is completely acurate since when in insert mode I can still insert the clipboard, local&remote , Shift+middlemouse. Whith only vim installed...

Offline

#4 2017-08-17 16:34:08

nachopro
Member
Registered: 2013-08-23
Posts: 78

Re: ["SOLVED"] New system and VIM issue

as qinohe says, with Shift it works, but It's very unconfortable for me.

Installs gvim is not an option! (Total Installed Size:  298.98 MiB)

Any "cheat or somethings" to avoid use Shift+MiddleClick?

Offline

#5 2017-08-17 17:03:47

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: ["SOLVED"] New system and VIM issue

You could try a plugin like easy-clip, but when I need it I use that previous method like you do now, or I use scp to copy the file, so I didn't try easy-clip.

Offline

#6 2017-08-17 18:11:30

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: ["SOLVED"] New system and VIM issue

qinohe wrote:
Chazza wrote:

See https://wiki.archlinux.org/index.php/Vim#Clipboard

Note that for the clipboard feature you need the gvim package installed instead of the vim package - though you can still use console vim, you don't need to actually use graphical vim.

I don't think this is completely acurate since when in insert mode I can still insert the clipboard, local&remote , Shift+middlemouse. Whith only vim installed...

Ah I think that's the underlying terminal's paste. But if you want vim itself to have access to clipboard and/or primary then you need gvim. By that I mean you can do "+yy commands in vim and it will copy the line into the clipboard.

If you do vim --version you can see what features its been compiled with. If you have the vim package then you'll notice you have -clipboard and -xterm_clipboard where minus indicates that the feature is missing and plus indicates that the feature is present.

Last edited by Chazza (2017-08-17 18:18:43)

Offline

#7 2017-08-17 18:51:54

nachopro
Member
Registered: 2013-08-23
Posts: 78

Re: ["SOLVED"] New system and VIM issue

Sorry Chazza but I have some "old" Arch machines without x nor gvim that are working properly with copy and paste via SSH from an remote X desktop.

I don't know if I missed some package, but in the systems where it is working vim does not have support for xterm_clipboard, clipboard nor X11

:'(

Offline

#8 2017-08-17 19:38:13

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: ["SOLVED"] New system and VIM issue

nachopro wrote:

Sorry Chazza but I have some "old" Arch machines without x nor gvim that are working properly with copy and paste via SSH from an remote X desktop.

I don't know if I missed some package, but in the systems where it is working vim does not have support for xterm_clipboard, clipboard nor X11

:'(

Yeah, I'm sorry. I misunderstood you. On first read, I thought what you wanted was for vim to have access to the clipboard/primary for which you _do_ need gvim. But if I'm understanding you correctly now what you _actually_ want is to use the underlying terminal's copy-paste facility. So please disregard what I said about gvim and the clipboard - it's addressing a slightly different issue. My apologies.

nachopro wrote:

I'm using :set mouse=r when I open vim, but it is not persisten. (i tried with ~/.vimrc - /etc/vimrc - /usr/share/vim/vimfiles/archlinux.vim without success)

Ok, well set mouse=r in my ~/.vimrc works fine for me. You shouldn't need to edit anything in /etc or /usr - .vimrc in home takes precedence. My suggestion would be to return /etc/vimrc and /usr/share/vim/vimfiles/archlinux.vim to their defaults before doing anything else.

nachopro wrote:

I cant copy with mouse selection nor paste with middle button

Just so I'm understanding you here, what actually happens when you try and copy with mouse selection? Is the problem that vim goes into visual mode instead of the terminal selecting the characters? And what happens when you try and paste with only the middle mouse button? Does nothing happen?

Also, what terminal are you using and what's in your ~/.vimrc? If your terminal is xterm/urxvt, does selection go to the primary (default) or to the actual clipboard?

Last edited by Chazza (2017-08-17 20:05:26)

Offline

#9 2017-08-17 21:54:31

nachopro
Member
Registered: 2013-08-23
Posts: 78

Re: ["SOLVED"] New system and VIM issue

Well! I fixed it! I created a ~/.vimrc with set mouse=r and now It's Working fine!

But if I add this config in /etc/vimrc does not work! This is a confusing behaviour but thanks for your time!

Offline

#10 2017-08-18 00:19:17

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: ["SOLVED"] New system and VIM issue

Please remember to mark your thread as [SOLVED] if this is solved.

Offline

Board footer

Powered by FluxBB