I just installed MinGW on Windows and I'm unable to copy/paste as I am used to on Linux or even PuTTY. What is the trick for copying and pasting text (e.g. from chrome) into MinGW shell?
To copy: highlight the portion you want and click 'y' To cut: highlight the portion you want and click 'd' To paste: Ctrl + Shift + v.
Ctrl+Shift+C and Ctrl+Shift+V If you highlight text in the terminal window with your mouse and hit Ctrl+Shift+C you'll copy that text into a clipboard buffer. You can use Ctrl+Shift+V to paste the copied text into the same terminal window, or into another terminal window.
Similarly, you can use Ctrl+shift+C to copy text from the terminal and then use it to paste in a text editor or web browser using the regular Ctrl+V shortcut. Basically, when you are interacting with the Linux terminal, you use the Ctrl+Shift+C/V for copy-pasting.
This can be enabled through the same settings menu described below by clicking the checkbox next to "Use Ctrl+Shift+C/V as Copy/Paste". Another solution would be to enable "QuickEdit Mode" and then you can paste by right-clicking in the terminal.
Right-click on the title bar of the command window and select 'Properties', then on the 'Options' tab tick the box for the 'QuickEdit mode', then click 'Ok'.
After that you can paste text from the clipboard using the right mouse-button, highlight text while holding down the left mouse-button and copy selected text using the ENTER key.
This procedure works on Windows 7/8, not Windows 10.
[Alternative] For MINGW64 (mintty 2.7.9) terminal in Windows 10, you can enable "Ctrl+Shift+letter shortcuts" to perform copy with (Ctrl+Shift+c) and paste with (Ctrl+Shift+v).
To enable the feature:
When you vi/vim into a file:
This mintty bug CTRL + C & CTRL + V copy paste addresses the issue. It allows normal Control-C, Control-V copy and pasting, but at the expense of changing other control characters. So to stop a process running you need Control-Shift-C, to interrupt it you would need Control-Shift-Z and to send an EOT you need Control-Shift-D. You may find the advantage of windows copy and paste outwights the disadvantages.
The behavior needs a flag to be set in the .minttyrc
file. WHich should look like
CtrlShiftShortcuts=yes
CtrlExchangeShift=yes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With