In 2010 I started a project to bring such functionality to Vim. The project 
implements the function popuplist with the following interface:

    let items = ['Item 1', 'Item 2', 'Item 3']
    let opts = {'current': 1 }
    let rv = popuplist(items, 'Example', opts)
    if rv.status == 'accept'
      echo items[rv.current]
    endif

The code is in my clone of Vim on branch vim-popuplist:

https://github.com/mmahnic/vim/tree/vim-popuplist

The core is in popuplst.c and various extensions are in puls_x files. The 
system is described in runtime/doc/popuplist.txt. The problem for the adoption 
in Vim is that it is written in "Object Oriented" C and has to go through a 
"precompiler" written in Python (mmoocc.py). 

There are various modes for filtering the list: fuzzy matching,regex matching 
and word matching. Expressions can also be highlighted without filtering. 

Here are some screenshots from the old Python version: 
http://vimuiex.sourceforge.net/screenshot/vxrecentfile.png.html. The C version 
looks similar.

There are also some known bugs that would have to be fixed, but I haven't had 
the time to do it in the last few years although I use it daily through the 
vimuiex library. It can run processes (like grep) in the background so the list 
of items is growing while the user already explores it; this functionality 
should be modified to use channels. 

If there is interest the code could probably be used as a start.


On Sunday, October 28, 2018 at 7:47:01 PM UTC+1, Tom Link wrote:
> Add support for QuickPick similar to VsCode and SublimeText - 
> https://code.visualstudio.com/docs/extensionAPI/vscode-api#QuickPick
> 
> This is basically what ctrlp.vim/fzf/fzy/vim-fz does but better. As a plugin 
> author it is very difficult to support all these plugins to get fuzzy search. 
> sometime I don't even use those and it becomes a maintenance headache for me 
> to support it. I would like to see vim provide one of those UI so as a plugin 
> author I only need to support one of them. Similar to how we have loclist and 
> quickfix list. Ship it by default so I don't need to tell users to install 
> more plugins to get fuzzy picker working.
> 
> Problems with current fuzzy search.
> 

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to