Hi, On Fri, Sep 18, 2020 at 1:23 PM Prabir Shrestha <[email protected]> wrote:
> It is very common if you are trying to create a fuzzy matching for files. > > Here is a real example where I'm searching for sys\dri\hosts. In this > case I'm actually interested in hosts file and not sys. this means hosts > needs to be highlighted. > This is already supported. For example, using your sample input: let f = ['System32\drivers\etc\lmhosts.sam', 'System32\drivers\mausbhost.sys', 'System32\drivers\etc\hosts.ics', 'System32\drivers\etc\hosts'] echo matchfuzzypos(f, 'Sys\dri\hosts') produces the following output [['System32\drivers\etc\hosts', 'System32\drivers\etc\hosts.ics', 'System32\driv ers\etc\lmhosts.sam', 'System32\drivers\mausbhost.sys'], [[0, 1, 2, 8, 9, 10, 11 , 16, 21, 22, 23, 24, 25], [0, 1, 2, 8, 9, 10, 11, 16, 21, 22, 23, 24, 25], [0, 1, 2, 8, 9, 10, 11, 16, 23, 24, 25, 26, 27], [0, 1, 2, 8, 9, 10, 11, 16, 22, 23, 24, 25, 27]]] Using the matching positions in the above output, you can highlight the characters like shown below in your example. Regards, Yegappan > [image: image] > <https://user-images.githubusercontent.com/287744/93641752-aae6c700-f9b1-11ea-92df-8113c97664b9.png> > > In projects I can see this using as > controller/feature/featuresA/component.tsx, > controller/features/featuresA/service.tsx I might want to use > featureA/service. which means I want both to highlight. > > > -- -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAAW7x7nn2uRYvjOkDxA8YJ8pVUaop7fm-K_kC-9Bq6%2BsK5t97w%40mail.gmail.com.
