Live data from Hacker News

Pasting in command line Vim doesn't have to suck

userobsessed.net

1–10 of 34 posts

Re: Pasting in command line Vim doesn't have to suck

#3
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.

Re: Pasting in command line Vim doesn't have to suck

#4
post #3

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.

Although if you're using Vim over SSH from a Windows box, the :set paste command is useful to know.

Re: Pasting in command line Vim doesn't have to suck

#5
post #3

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.

  :set pastetoggle=
Wack F5, middle-click paste away.

Re: Pasting in command line Vim doesn't have to suck

#6
post #3

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.

Unless, 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.

Re: Pasting in command line Vim doesn't have to suck

#7
post #3

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.

:set pastetoggle= Wack F5, middle-click paste away.

Sure, that works great if you want to reach for the mouse.

Re: Pasting in command line Vim doesn't have to suck

#8
post #3

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.

Good 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?

Re: Pasting in command line Vim doesn't have to suck

#9
post #2

... and I thought it was how to paste in vim commandline after :

How to paste in vim commandline after :

    
    (normal mode)
    q:
    (fully vim editable window of :command line history)
    (edit one of the command lines, yank and put all you like)
    (or edit the new blank command line at the bottom)
    
    (to execute the current line, or)
    :q
    (to quit without executing)
    (normal mode)
Notice the symmetry of q: to get in, and :q to get out (if you don't execute).

q/ and q? to edit and execute search history.

[edit formatting]

Post reply on HN