News for hackers. Stuff that matters.
Re:Pasting in command line Vim doesn't have to suck by bawatski on Tuesday May 10, 2011 @09:53AM (#2532467)
... and I thought it was how to paste in vim commandline after :
Re:Pasting in command line Vim doesn't have to suck by sixtofour on Tuesday May 10, 2011 @10:27AM (#2532587)
How to paste in vim commandline after :

    <ESC>
    (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)
    <ESC><ENTER>
    (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]

Re:Pasting in command line Vim doesn't have to suck by cschneid on Tuesday May 10, 2011 @11:06AM (#2532710)
ctrl-r <register> pastes that register into your command.

So I often need to find "where is this method defined" across a large project.

    yw (yank word to get method into the " register)
    :Ack <ctrl-r>"  (ack plugin, paste that default " register)
    <enter> yay! I found it.
Alternately:

    /foo  (attempt to find foo in this file. Whoops, not there, where is it!).
    :Ack <ctrl-r>/  (last search is in the / register).
    There it is!
Re:Pasting in command line Vim doesn't have to suck by bawatski on Wednesday May 11, 2011 @01:45AM (#2535311)
wow! this is exactly what i was looking for. thank you.