{"id":5144,"date":"2019-01-22T19:46:35","date_gmt":"2019-01-22T18:46:35","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=5144"},"modified":"2019-01-22T09:04:49","modified_gmt":"2019-01-22T08:04:49","slug":"5144","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2019\/01\/22\/5144\/","title":{"rendered":"How do I paste from PuTTY into Vim 8.0?"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\"><a href=\"https:\/\/stackoverflow.com\/questions\/40165875\/how-do-i-paste-from-putty-into-vim-8-0\">How do I paste from PuTTY into Vim 8.0?<\/a><\/h1>\n\n\n\n<p>Well, nice question, as I found it quite annoying that the usual right click on the mouse doesn&#8217;t work. In fact<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p> <br \/> Open a web browser, copy \/ paste some text from a website (eg. GitHub)<br \/> Use PuTTY 0.67 to SSH to a Linux VM (eg. Ubuntu 16 Xenial Xerus)<br \/> Open a file in Vim<br \/> Hit <code class=\"\" data-line=\"\">i<\/code> to change into Insert mode<br \/> Right-click to paste the clipboard contents <br \/> Issue<br \/> Unfortunately, when I right-click in the PuTTY session, rather than  pasting clipboard contents, what&#8217;s actually happening is that Vim is  going from <code class=\"\" data-line=\"\">INSERT<\/code> mode to <code class=\"\" data-line=\"\">(insert) VISUAL<\/code> mode. I don&#8217;t think I&#8217;ve ever seen anything like this before. <\/p><\/blockquote>\n\n\n\n<p>Luckly it seems that there&#8217;s an easy workaround.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p> <br \/><strong>Adapt to it<\/strong>: With mouse mode turned on, the new way to paste is <em>shift-right-click<\/em> (at least in PuTTY) <\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">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&#8217;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&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2019\/01\/22\/5144\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[226,227,55],"class_list":["post-5144","post","type-post","status-publish","format-standard","hentry","category-senza-categoria","tag-putty","tag-ssh","tag-vim"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/s6daft-5144","jetpack-related-posts":[{"id":10754,"url":"https:\/\/monodes.com\/predaelli\/2023\/08\/31\/adding-parenthesis-around-highlighted-text-in-vim\/","url_meta":{"origin":5144,"position":0},"title":"Adding parenthesis around highlighted text in Vim","author":"Paolo Redaelli","date":"2023-08-31","format":false,"excerpt":"Lovely, lovely vim The command c()<Esc>P Explanation If you want to put the word under the cursor in to brackets this is viwc()<Esc>P. viw will visually select all charactrs in a word. c() will cchange the selection and drops you into insert mode, where you type the literal characters (\u2026","rel":"","context":"In &quot;vim&quot;","block_context":{"text":"vim","link":"https:\/\/monodes.com\/predaelli\/category\/vim\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10992,"url":"https:\/\/monodes.com\/predaelli\/2023\/12\/05\/search-and-replace-in-multiple-files-using-vim\/","url_meta":{"origin":5144,"position":1},"title":"Search and replace in multiple files using vim","author":"Paolo Redaelli","date":"2023-12-05","format":false,"excerpt":"Search and replace in multiple files using vim - (source Stack Overflow) It is as simple as Use: :set aw :argdo %s\/happy999\/happy111\/g The first line sets auto-write mode, so when you switch between files, vim will write the file if it has changed. The second line does your global search\u2026","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1037,"url":"https:\/\/monodes.com\/predaelli\/2016\/02\/21\/vim-master-cheat-sheet\/","url_meta":{"origin":5144,"position":2},"title":"Vim master cheat sheet","author":"Paolo Redaelli","date":"2016-02-21","format":false,"excerpt":"Sorgente: Vim by Patrick Schanen | ZEEF Vim, an open-source, powerful and configurable text editor.","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1507,"url":"https:\/\/monodes.com\/predaelli\/2016\/05\/07\/learning-vim\/","url_meta":{"origin":5144,"position":3},"title":"Learning VIM","author":"Paolo Redaelli","date":"2016-05-07","format":false,"excerpt":"She likes to write on the terminal. She is learning VIM. She is 6 years old.","rel":"","context":"In &quot;Mood&quot;","block_context":{"text":"Mood","link":"https:\/\/monodes.com\/predaelli\/category\/mood\/"},"img":{"alt_text":"silvia-usa-vim","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2016\/05\/silvia-usa-vim-510x302.jpeg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2625,"url":"https:\/\/monodes.com\/predaelli\/2017\/06\/16\/vim-is-the-perfect-ide\/","url_meta":{"origin":5144,"position":4},"title":"Vim Is The Perfect IDE","author":"Paolo Redaelli","date":"2017-06-16","format":"link","excerpt":"Vim Is The Perfect IDE Gonna copy this setup","rel":"","context":"In &quot;vim&quot;","block_context":{"text":"vim","link":"https:\/\/monodes.com\/predaelli\/category\/vim\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10923,"url":"https:\/\/monodes.com\/predaelli\/2023\/10\/24\/5-must-have-vim-plugins-that-will-change-your-workflow\/","url_meta":{"origin":5144,"position":5},"title":"5 Must-Have Vim Plugins That Will Change Your Workflow","author":"Paolo Redaelli","date":"2023-10-24","format":false,"excerpt":"5 Must-Have Vim Plugins That Will Change Your Workflow. In my case Syntastic: a syntax checking plugin for Vim which runs files through external syntax checkers and displays resulting errors. Fugitive: a Git wrapper for Vim that is self-described as \"so awesome, it should be illegal.\" Emmet: an extremely useful\u2026","rel":"","context":"In &quot;Tricks&quot;","block_context":{"text":"Tricks","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/tricks\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/5144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=5144"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/5144\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=5144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=5144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=5144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}