putty – Paolo Redaelli https://monodes.com/predaelli A civil engineer with a longlife fondness for Software Libero Tue, 22 Jan 2019 08:04:49 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.2 91795679 How do I paste from PuTTY into Vim 8.0? https://monodes.com/predaelli/2019/01/22/5144/ https://monodes.com/predaelli/2019/01/22/5144/#respond Tue, 22 Jan 2019 18:46:35 +0000 https://monodes.com/predaelli/?p=5144 How do I paste from PuTTY into Vim 8.0?

Well, nice question, as I found it quite annoying that the usual right click on the mouse doesn’t work. In fact


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
Issue
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.

Luckly it seems that there’s an easy workaround.


Adapt to it: With mouse mode turned on, the new way to paste is shift-right-click (at least in PuTTY)

]]>
https://monodes.com/predaelli/2019/01/22/5144/feed/ 0 5144