Welcome to my Technology Hotspot
Showing posts with label vi. Show all posts
Showing posts with label vi. Show all posts
Tuesday, October 28, 2025
Issue while pasting from the Windows clipboard into a PuTTY vi or vim terminal
Pasting from the Windows clipboard into a PuTTY vi or vim terminal can sometimes be problematic, particularly with newer vim versions that have mouse mode enabled by default. This can lead to unintended visual mode activation or incorrect pasting.
Here are the primary methods to paste from the clipboard into a PuTTY vi/vimsession:
Shift + Right-Click:
Shift + Insert:
Middle Mouse Button (Wheel Click):
Disable vim Mouse Mode (if applicable):
vim Paste Mode:
Note: Ensure vi or vim is in insert mode (by pressing i) before attempting to paste if you want the content to be inserted directly into the file. Otherwise, pasting might be interpreted as vim commands.
For larger pastes, vim's paste mode can be helpful.
Enter insert mode in vim, then type :set paste and press Enter.
Paste your content using one of the methods above, then type :set nopaste and press Enter to exit paste mode.
If you are experiencing issues due to vim's mouse mode, you can disable it for the current session by typing :set mouse= and pressing Enter while in vim.
To make this change permanent, you can add set mouse= to your ~/.vimrc file.
If your mouse has a middle button (often the scroll wheel), clicking it can paste the content.
Shift + Insert:
This keyboard shortcut can also be used to paste the clipboard content.
This is often the most reliable method for pasting in PuTTY, especially when vim's mouse mode is active. Hold down the Shift key and then right-click in the PuTTY window where you want to paste.
Subscribe to:
Comments (Atom)
Featured
TechBytes on Linux
This is a growing list of Linux commands which might come handy for the of Linux users. 1. Found out i had to set the date like this: ...
Popular Posts
-
This is a growing list of Linux commands which might come handy for the of Linux users. 1. Found out i had to set the date like this: ...
-
To set a PDF viewer as the default on Mac OS X: Select any PDF file from Finder. Control-click to open the menu. ... Choose Get...
-
ಮ್ಯಾಕ್ ಬುಕ್ ನಲ್ಲಿ ಕನ್ನಡ ದಲ್ಲಿ ಟೈಪ್ ಮಾಡಲು ಲಿಪಿಕ ಎನ್ನುವ ಈ ಕೆಳಗಿನ ಲಿಂಕ್ ಅನ್ನು ಕ್ಲಿಕ್ ಮಾಡಿ .pkg ಫೈಲ್ ಅನ್ನು ಡೌನ್ ಲೋಡ್ ಮಾಡಿ ಅದನ್ನು ಇನ್ಸ್ತಾಲ್ ಮಾಡಿ...