Fedora Linux Support Community & Resources Center
  #1  
Old 23rd December 2016, 03:45 AM
Dinesh Sharma Offline
Registered User
 
Join Date: Nov 2008
Posts: 77
linuxfedorafirefox
Unable to cut and paste to/from vi

I am using Fedora 25 with mate. The system was upgraded from Fedora 24 some time ago and is fully updated (kernel 4.8.14-300).

I find that I cannot cut and paste into vi any more. (I start vi in a terminal, go into input mode, hi light some text in a browser and try to paste it into the file being edited using middle button. The text is not inserted - just a blank line gets inserted.) I might add that the middle button is being emulated by a simultaneous press of left and right buttons. Also, I am unable to cut and paste from a file being edited using vi into a terminal.

There is no problem in using the same procedure with pluma. This used to work with vi earlier in Fedora 24.

I am a vi addict and will be grateful for suggestions about methods to restore the cut and paste facility with vi.
Reply With Quote
  #2  
Old 23rd December 2016, 08:11 AM
srakitnican Offline
Registered User
 
Join Date: Oct 2011
Posts: 1,396
linuxchrome
Re: Unable to cut and paste to/from vi

Are you using Wayland or Xorg?
Reply With Quote
  #3  
Old 23rd December 2016, 08:32 AM
Dinesh Sharma Offline
Registered User
 
Join Date: Nov 2008
Posts: 77
linuxfedorafirefox
Re: Unable to cut and paste to/from vi

This is a mate set up -- not gnome. I believe it uses Xorg. (The updates have often included xorg packages).
Reply With Quote
  #4  
Old 23rd December 2016, 09:01 AM
artu72 Offline
Registered User
 
Join Date: Mar 2007
Posts: 82
linuxfedorafirefox
Re: Unable to cut and paste to/from vi

Quote:
Originally Posted by Dinesh Sharma View Post
This is a mate set up -- not gnome. I believe it uses Xorg. (The updates have often included xorg packages).
Same problem in Gnome. When trying to paste something in vi with middle mouse click, vi switches to visual mode without pasting.
Reply With Quote
  #5  
Old 23rd December 2016, 11:58 AM
zimon Offline
Registered User
 
Join Date: Sep 2004
Posts: 301
linuxfedorafirefox
Re: Unable to cut and paste to/from vi

I am still in fc23, but...

If in gnome-terminal I run vim or vi, and I select something from Firefox, then try to paste it to vi or vim with middle mouse button in insert-mode, it just emits "("

But I think it has always done that.

To copy+paste to vim running in gnome-terminal, one can copy to clipboard normally by selecting something, then Ctrl+C, or context-menu + Copy
Then in the vim, in (i)nsert mode, one can paste with Ctrl+Shift+V. Or using gnome-terminal's window-menu Edit > Paste.

The Shift is needed, I do not remember why, but obviously at least fot Ctrl+C in terminal there is another meaning.
Reply With Quote
  #6  
Old 24th December 2016, 02:59 PM
Dinesh Sharma Offline
Registered User
 
Join Date: Nov 2008
Posts: 77
linuxfedorafirefox
Re: Unable to cut and paste to/from vi

Quote:
Originally Posted by zimon View Post
I am still in fc23, but...

If in gnome-terminal I run vim or vi, and I select something from Firefox, then try to paste it to vi or vim with middle mouse button in insert-mode, it just emits "("

But I think it has always done that.

To copy+paste to vim running in gnome-terminal, one can copy to clipboard normally by selecting something, then Ctrl+C, or context-menu + Copy
Then in the vim, in (i)nsert mode, one can paste with Ctrl+Shift+V. Or using gnome-terminal's window-menu Edit > Paste.

The Shift is needed, I do not remember why, but obviously at least fot Ctrl+C in terminal there is another meaning.
I never had this problem in Fedora 23/24. Perhaps because I was using mate.

I do not like the windows like ^C/^V method for copy paste. ^v is used as a prefix for special characters in vi.
Reply With Quote
  #7  
Old 24th December 2016, 03:19 PM
smr54 Online
Registered User
 
Join Date: Jan 2010
Posts: 7,072
linuxchrome
Re: Unable to cut and paste to/from vi

I'm guessing you're using the default Gnome-terminal, correct? Just for fun, what happens if you try in say, urxvt? Or using shift+insert (and sometimes ctl+insert or ctl+shift+insert, but shift-insert seems the most consistent.)

For what it's worth, using dwm and urxvt, middle mouse button works fine for me.
Reply With Quote
  #8  
Old 24th December 2016, 03:22 PM
topiwala Offline
Registered User
 
Join Date: Aug 2011
Location: India
Age: 31
Posts: 343
linuxfedorafirefox
Re: Unable to cut and paste to/from vi

Are you able to paste things in other apps like pluma? Just highlighting doesnt copies the text in my laptop in MATE and firefox. Are you using any sort of clipboard manager?
Reply With Quote
  #9  
Old 25th December 2016, 01:48 AM
Dinesh Sharma Offline
Registered User
 
Join Date: Nov 2008
Posts: 77
linuxfedorafirefox
Re: Unable to cut and paste to/from vi

Quote:
Originally Posted by topiwala View Post
Are you able to paste things in other apps like pluma? Just highlighting doesnt copies the text in my laptop in MATE and firefox. Are you using any sort of clipboard manager?
As I said in my original post, I am able to cut and post in pluma using hi light and middle button click. I am not using any clipboard manager.

To smr54: I am using mate terminal. I am not on gnome.
Reply With Quote
  #10  
Old 25th December 2016, 07:48 AM
nsnbm Offline
Registered User
 
Join Date: Dec 2007
Location: Australia
Posts: 1,527
linuxfedorafirefox
Re: Unable to cut and paste to/from vi

Quote:
If in gnome-terminal I run vim or vi, and I select something from Firefox, then try to paste it to vi or vim with middle mouse button in insert-mode, it just emits "("
That shouldn't happen. I use many terminals, but not gnome-terminal, and have no trouble pasting.

To the OP's problem, assuming the terminals are in use in X, I would make sure that the latest of all the X rpms are installed. I suppose you could consider downgrading to the X in which the emulation worked to check the difference. I'd consider installing vim and see if that helps. I'd consider trying another mouse with a third button to avoid emulation. I wonder if the same problem arises in the virtual terminals (non-X) perhaps using text browsers. In elinks, for example, the shift key has to be used to cut text. Sounds like a frustrating problem I'm glad I don't have as a vi user.

Last edited by nsnbm; 25th December 2016 at 09:32 AM.
Reply With Quote
  #11  
Old 25th December 2016, 02:50 PM
Dinesh Sharma Offline
Registered User
 
Join Date: Nov 2008
Posts: 77
linuxfedorafirefox
Re: Unable to cut and paste to/from vi

Quote:
Originally Posted by nsnbm View Post
That shouldn't happen. I use many terminals, but not gnome-terminal, and have no trouble pasting.

To the OP's problem, assuming the terminals are in use in X, I would make sure that the latest of all the X rpms are installed. I suppose you could consider downgrading to the X in which the emulation worked to check the difference. I'd consider installing vim and see if that helps. I'd consider trying another mouse with a third button to avoid emulation. I wonder if the same problem arises in the virtual terminals (non-X) perhaps using text browsers. In elinks, for example, the shift key has to be used to cut text. Sounds like a frustrating problem I'm glad I don't have as a vi user.
My system is fully up to date. (Kernel 4.8.15 and associated x rpms, with mate as the window manager). I have this problem on at least three set ups (Desktops at home and office and a laptop), all upgraded from Fedora 24. So this is not a hardware or mouse problem. The desktops do have three button mice. At least one other user has reported similar problems in this thread. Also, unix style cut and paste works in pluma. Clearly, some setting has gone awry during upgrade from f24 to f25. The problem is indeed frustrating!
Reply With Quote
  #12  
Old 27th December 2016, 05:59 PM
petasis Offline
Registered User
 
Join Date: Dec 2016
Location: London
Posts: 9
windows_98_nt_2000firefox
Re: Unable to cut and paste to/from vi

Well for me, fedora 25 is a shock, nothing works :-)

Regarding vim, the defaults have changed. In order to get the old behaviour back, just put in your ~/.vimrc:

set mouse=a

If you look in /etc/vimrc, they have added:
set mouse=v

You cannot even move the cursor with the mouse with mouse=v...
Reply With Quote
  #13  
Old 28th December 2016, 04:05 PM
Dinesh Sharma Offline
Registered User
 
Join Date: Nov 2008
Posts: 77
linuxfedorafirefox
Re: Unable to cut and paste to/from vi

Quote:
Originally Posted by petasis View Post
Regarding vim, the defaults have changed. In order to get the old behaviour back, just put in your ~/.vimrc:

set mouse=a

If you look in /etc/vimrc, they have added:
set mouse=v
Thanks Petasis. That works!

Apologies for an off topic rant -- but are these whimsical changes announced somewhere - so that one may take evasive action?
Reply With Quote
  #14  
Old 28th December 2016, 04:12 PM
petasis Offline
Registered User
 
Join Date: Dec 2016
Location: London
Posts: 9
windows_98_nt_2000firefox
Re: Unable to cut and paste to/from vi

I am not sure. Gvim didn't work also for me, but I suspected mouse settings quite quickly...
So, when I saw your thread, I already knew the answer...
Reply With Quote
  #15  
Old 7th January 2017, 10:05 PM
DougRoyer Offline
Registered User
 
Join Date: Jan 2017
Location: U.S.A.
Posts: 1
linuxfedorafirefox
Re: Unable to cut and paste to/from vi

THANKS.
I have been using VI since the original, and under X11 since X-windows first came out. I really hate it when something that has worked for so long is changed. The :set mouse=v worked for me.

WHY would someone change such a basic UNIX/BSD/Linux thing?
Reply With Quote
Reply

Tags
cut, paste, to or from, to or from vi, unable

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to do copy/paste in fedora <=>ubuntu prabhas Using Fedora 2 2nd October 2011 07:03 PM
not able to copy-paste or cut-paste adarsh.ist Using Fedora 2 9th January 2009 01:13 PM
Unable to cut and paste to and from VM to windows XP stmas Using Fedora 2 8th April 2008 04:11 PM
cut and paste fazo Using Fedora 5 21st July 2004 03:45 PM


Current GMT-time: 04:42 (Friday, 21-07-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat