[vim/vim] Right-click pasting from PuTTY on Windows 10 (#1188)

148 views
Skip to first unread message

Trevor Sullivan

unread,
Oct 20, 2016, 5:38:47 PM10/20/16
to vim/vim

Vim 8.0 is pretty rad, and has some incredible new features! Unfortunately, it broke one of my common workflows, when copying and pasting text into a document.

From a Windows 10 Anniversary Update client ...

  • Open a web browser, copy / paste some text from a website (eg. GitHub)
  • Use PuTTY 0.67 to SSH to a Linux VM (eg. Ubuntu 16 Xenial Xerus)
  • Open a file in Vim
  • Hit i to change into Insert mode
  • Right-click to paste the clipboard contents

Unfortunately, when I right-click in the PuTTY session, rather than pasting clipboard contents, what's actually happening is that Vim is going from INSERT mode to (insert) VISUAL mode. I don't think I've ever seen anything like this before. Does anyone know why this is happening, and how I can paste my Windows client clipboard into the SSH / Vim session?

image

Cheers,
Trevor Sullivan
Docker Captain
Microsoft MVP: Cloud & Data Center Management
https://trevorsullivan.net
https://twitter.com/pcgeek86


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub

JohnBeckett

unread,
Oct 20, 2016, 7:40:51 PM10/20/16
to vim_dev
On Friday, October 21, 2016 at 8:38:47 AM UTC+11, Trevor Sullivan wrote:
> Unfortunately, when I right-click in the PuTTY session, rather
> than pasting clipboard contents, what's actually happening is
> that Vim is going from INSERT mode to (insert) VISUAL mode.

Doing a right-click in Putty causes it to send the contents of the clipboard to the remote server, that is, to Vim which is in insert mode because you used "i". It sounds like a Putty config problem, or something weird in the clipboard.

In Putty, rather than doing a right-click, try typing Shift-Insert which should have the same effect. What happens?

John

K.Takata

unread,
Oct 20, 2016, 8:00:53 PM10/20/16
to vim/vim

Check your 'mouse' setting with :set mouse?.
If you include vimrc_example.vim from your .vimrc, the setting of 'mouse' will be changed after Vim 8.

FYI, Shift+Ins might be also used to paste on PuTTY.

Christian Brabandt

unread,
Oct 21, 2016, 1:41:35 AM10/21/16
to vim/vim

Closed #1188.

Trevor Sullivan

unread,
Oct 21, 2016, 1:20:04 PM10/21/16
to vim/vim

Thanks @k-takata -- I fixed this problem by using:

:set mouse=

Mas

unread,
Dec 14, 2016, 12:59:17 AM12/14/16
to vim/vim

I am wondering if this is a bug was by design in VIM 8? The same is happening via Fedora 25. When right clicking it put you into visual mode. The only fix is to add set mouse-=a or set mouse= to .vimrc

Trevor Sullivan

unread,
Nov 21, 2018, 1:06:49 PM11/21/18
to vim/vim, Subscribed

A couple years later ... I ran into this same issue again, and SHIFT + INSERT works perfectly as well. Thanks again.

Stefan300381

unread,
Apr 4, 2020, 1:01:47 PM4/4/20
to vim/vim, Subscribed

this helped me in 2020 ;-) thanks


You are receiving this because you are subscribed to this thread.

Reply to this email directly, view it on GitHub, or unsubscribe.

Marcel Hecko

unread,
Jan 5, 2021, 6:28:29 AM1/5/21
to vim/vim, Subscribed

this helped me in 2020 ;-) thanks

and now me in 2021! :)


You are receiving this because you are subscribed to this thread.

Reply to this email directly, view it on GitHub, or unsubscribe.

Philipp Posovszky

unread,
Jun 30, 2021, 3:15:28 PM6/30/21
to vim/vim, Subscribed

and it still helps :)


You are receiving this because you are subscribed to this thread.

Reply to this email directly, view it on GitHub, or unsubscribe.

jay-yuan-moodys

unread,
Aug 5, 2021, 12:44:37 PM8/5/21
to vim/vim, Subscribed

It still helped me in 2010


You are receiving this because you are subscribed to this thread.

Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

Thomas Beckler

unread,
Nov 13, 2021, 4:43:32 PM11/13/21
to vim/vim, Subscribed

you made my day! Thank you


You are receiving this because you are subscribed to this thread.

Reply to this email directly, view it on GitHub.

MPolitze

unread,
Jan 2, 2023, 5:01:27 AM1/2/23
to vim/vim, Subscribed

cheers from 2023!


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/1188/1368793076@github.com>

Reply all
Reply to author
Forward
0 new messages