I am playing with my vimrc settings, and enabled the mouse support.
set mouse=a
Now, I miss the copy and paste option with mouse. Normally, if the mouse is not enabled, I could copy text with left click + drag, and paste by right click (in Insert mode). So,
How to get the copy, paste with mouse enabled (with mouse click, not Ctrl+v etc). The only option I need with mouse enabled is to click anywhere in the file and the cursor points to that location. This helps faster navigation.
I use putty (x-term) to connect to my debian server.
In general, mouse reporting is not enabled in apps by default. For example, to enable mouse reporting in Vim, you need to add a set mouse=a command to your ~/. vimrc file. In the Terminal app on your Mac, choose View > Allow Mouse Reporting.
If you want ":set mouse=a" to work over SSH, just use the '-X' option when using SSH. If using vim in xterm and having set mouse=a, you will notice mouse middle-click paste no longer seems to work. Instead use Shift+middle-click to paste X selection.
With that mentioned mapping, \c will do "+y which will copy from the register known as +, to the clipboard. And \v will paste from the register known as +. So that's a copy/paste that works between windows.
Easiest solution is just to hold shift down when you select text, to get the old behavior for mouse-copy. Paste with shift-mouseclick will usually work too.
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