8 ms·
When the author says "command line Vim" he means "Vim running in a terminal emulator". And pasting to terminal Vim doesn't suck if your Vim is configured to de
by graywh 15y ago
When the author says "command line Vim" he means "Vim running in a terminal emulator".
And pasting to terminal Vim doesn't suck if your Vim is configured to detect mouse clicks or interface with the system clipboard. Using the system paste shortcut (command- or ctrl-V) in insert mode is not the way to do it.
- Leynos 15y agoAlthough if you're using Vim over SSH from a Windows box, the :set paste command is useful to know.
- burgerbrain 15y ago:set pastetoggle=<F5> Wack F5, middle-click paste away.
- joefiorini 15y agoSure, that works great if you want to reach for the mouse.
- jrockway 15y agoPretty sure vi does not care about, or is even able to detect, the difference between a middle-mouse and a shift-insert paste.
- pyre 15y agoUnless your terminal emulator has mouse support and you ':set mouse=a' in Vim.
- irahul 15y agoAs mentioned elsewhere, if your vim is compiled with clipboard support(:version and look for +clipboard), you can copy/paste from the clipboard. * is the Linux selection register. + is your clipboard. So yanking is just set paste, "+y or " * y, set nopaste. Similarly you can do a "+d in vim and ctrl-v it in your browser or anywhere you can access the clipboard. You can " * d/" * y and paste it with your middle mouse button.
- burgerbrain 15y agoThe mouse has nothing to do with it... If you paste method doesn't let vim know what's going on, use pastetoggle, otherwise don't.
- jdj 15y agoOr you can use shift+insert.
- zosi 15y agoUnless, of course, the system clipboard is on a different machine than the running copy of Vim. This is useful advice, you really don't have to be so negative about it just because you aren't in a situation where it's applicable.
- pyre 15y agoIf your ssh session has X11 forwarding enabled, and the remote terminal Vim has +xclipboard support, then you can use the "+P keystroke to paste directly from the clipboard into Vim.
- deleted 15y ago[deleted]
- joefiorini 15y agoGood point on my wording, thank you. I will change that to make it less confusing. As for middle-click, I really don't want to use the mouse. I don't use it for pasting anywhere else, so why would I change that for Vim?