You are not logged in.

#1 2009-02-21 19:41:07

timm
Member
From: Wisconsin
Registered: 2004-02-25
Posts: 417

Cut and paste from Windows to vi via putty

I'm using putty to access my linux machine from my windows machine, as my wife is using the mythtv on the linux machine...

I need to cut some text from a windows document and insert it into a document on the linux machine.  I loaded up putty and can open the document in vi (I guess it really is vim), cut it from the windows document, and try to past into vi.  I am sure I used to be able to do this by right clicking where I wanted the text to go, but now vi just goes into Visual mode (the bottom of the screen says  ----(insert)  VISUAL     and I cannot paste.

Not sure what I did to start causing this behavior, or what to do to undo it, or whether I'm just remembering wrong, but reading internet sources seems to confirm I should be able to do what I am trying to do.

Offline

#2 2009-02-21 20:23:01

fukawi2
Forum Moderator
From: .vic.au
Registered: 2007-09-28
Posts: 5,326
Website

Re: Cut and paste from Windows to vi via putty

You need to be in visual mode with "INSERT" down the bottom before you try and paste. Is that what you're doing?

Offline

#3 2009-02-21 20:46:03

decaturguy
Member
From: Sweden
Registered: 2006-11-28
Posts: 117

Re: Cut and paste from Windows to vi via putty

I have the same problem it started few weeks ago. I have Arch server without X so i have to ssh and maintain the server. To paste in vi i use the scroll button. Its not only in putty from windows but also in Linux terminals too except Linux terminals is way better, if the scroll button don't work you can just  click on Edit and Paste or (shift+ctrl+v) from gnome-terminal.

When i try to paste using the scroll button i get this error message:
E353: Ingenting i register" my locale is Swedish so in English it translate something like this E353: nothing in register"

Offline

#4 2009-02-22 05:18:34

timm
Member
From: Wisconsin
Registered: 2004-02-25
Posts: 417

Re: Cut and paste from Windows to vi via putty

I am in INSERT mode before I try to paste; the  -- (insert) VISUAL -- message comes up when I right click.

Offline

#5 2009-02-22 06:25:29

Sir_Hearse
Member
Registered: 2009-02-18
Posts: 6

Re: Cut and paste from Windows to vi via putty

I've always just used right clicks to c/p into the putty window- in vim, seems to work with or without being in insert mode first.  That said, X11 forwarding isn't an option?

Offline

#6 2009-02-22 12:48:24

dschrute
Member
From: NJ, USA
Registered: 2007-04-09
Posts: 183

Re: Cut and paste from Windows to vi via putty

I had the same problem.  For me the issue was the following lines in /etc/vimrc :

if has('mouse')
  set mouse=a
endif

I commented them out and paste now works as expected.  Also see post here :
http://bbs.archlinux.org/viewtopic.php?id=65208

Offline

#7 2009-02-22 14:59:58

decaturguy
Member
From: Sweden
Registered: 2006-11-28
Posts: 117

Re: Cut and paste from Windows to vi via putty

dschrute wrote:

I had the same problem.  For me the issue was the following lines in /etc/vimrc :

if has('mouse')
  set mouse=a
endif

I commented them out and paste now works as expected.  Also see post here :
http://bbs.archlinux.org/viewtopic.php?id=65208

Thanks I set to mouse-=a and it worked.

Offline

Board footer

Powered by FluxBB