Paul,

On Thu, Apr 4, 2013 at 11:44 AM, Paul  Moore <[email protected]> wrote:
> One really useful feature of Sublime Text is the "fuzzy match" behaviour of 
> popup menus. The way this works is that if you have a menu with items 
> "begin", "end", "eat", you start with all items showing. Then, as you type 
> letters, the list is restricted to only those items containing the typed 
> letters - but the letters do not have to be consecutive, or at the start of 
> the items being completed.
>
> So, with the above example, type "e" and nothing changes (but the first "e" 
> is highlighted in each item). Then type "n" and "eat" is removed from the 
> list. Add "d" and "end" is selected.
>
> In effect the list is restricted to the items that match the regex 
> .*<ch1>.*<ch2>.*<ch3>.* where ch1, ch2 and ch3 are the typed characters.
>
> I don't think this is currently possible in Vim. Would it be feasible to add 
> behaviour like this to the completion menu code? (On the other hand, if it 
> *is* possible already, can someone give me a pointer to some sample code?)

I think various completion plugins already do that. One instance I know
of is at

https://github.com/Valloric/YouCompleteMe

Scroll down and you'll see an animated demonstration with fuzzy
matching. Highlighting inside the popup menu isn't possible, though.

David

-- 
-- 
You received this message from the "vim_dev" 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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui