Friday, February 24, 2012

Re: Vim complete/suggest - sort by most used

On Feb 23, 10:25 am, lith <minil...@gmail.com> wrote:
> Am Donnerstag, 23. Februar 2012 15:29:19 UTC+1 schrieb MarcWeber:
>
> > This would require Vim keeping history about which ones you used most in
> > the past => that would be complex.
>
> It would seem feasible if there were a CompletionDone event. Such an event
> would be useful in other situations -- e.g. code skeleton expansion.
> Unfortunately, vim doesn't provide such an event, though I vaguely remember
> that somebody wrote a patch for that.


Yeah, without a CompletionDone event or something similar that would
allow a script to know what element was selected, this feature cannot
be successfully implemented.

To answer Marc's question, in case somebody digs up this thread at a
later date, assume I type in vi<C-N> and from the list of entries
comprised of: Vic, vigilante, vim, viral, virtual, Vixen - I select
"virtual" most of the time, followed by "Vixen" as the second most
used entry. Given this case, I'd like the list, when it shows again,
to be sorted in that order: "virtual", "Vixen", "Vic", "vigilante",
etc. Similar, if I types vir<C-N>, the list should be sorted: virtual,
viral, because I used virtual more often - even if it was with the
"vi" stem - than viral.

I'd love if this was a core feature: options to have vim sort complete
lists either alpha or by most used.

Thank you both for your answers.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: