Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/function/vim/mod.ts>matchfuzzypos

๐Ÿ“š Standard module for denops.vim
Go to Latest
function matchfuzzypos
import { matchfuzzypos } from "https://deno.land/x/denops_std@v3.9.0/function/vim/mod.ts";

Same as |matchfuzzy()|, but returns the list of matched strings, the list of character positions where characters in {str} matches and a list of matching scores. You can use |byteidx()| to convert a character position to a byte position. If {str} matches multiple times in a string, then only the positions for the best match is returned. If there are no matching strings or there is an error, then a list with three empty list items is returned. Example: :echo matchfuzzypos(['testing'], 'tsg') results in [['testing'], [[0, 2, 6]], [99]] :echo matchfuzzypos(['clay', 'lacy'], 'la') results in [['lacy', 'clay'], [[0, 1], [1, 2]], [153, 133]] :echo [{'text': 'hello', 'id' : 10}]->matchfuzzypos('ll', {'key' : 'text'}) results in [[{'id': 10, 'text': 'hello'}], [[2, 3]], [127]]

Parameters

denops: Denops
list: unknown
str: unknown
optional
dict: unknown

Returns

Promise<unknown>