Vim: How to create autocomplete/chooser from entries in buffer?

Posted by Doug Avery on Super User See other posts from Super User or by Doug Avery
Published on 2011-02-22T21:11:11Z Indexed on 2011/02/22 23:28 UTC
Read the original article Hit count: 286

Filed under:
|
|

Found out today that if you press Ctrl-Opt-Cmd-V in Textmate, it produces a cute little "chooser" dialogue in-place that allows you to page through your recent clipboard entries. It looks very similar to how CTRL-P and -N work in VIM, except it shows whole lines instead of simple word objects.

It seems like this would be doable in VIM — it already has a buffer full of entries (the YankRing buffer, for example), and it already has a chooser, but I can't think of where I'd look to start putting these two together. Any ideas?

(I know that YankRing already does this by opening a new window full of buffer content, but I wonder if there's a way to do it without all the window switching/closing/etc)

© Super User or respective owner

Related posts about vim

Related posts about autocomplete