Skip to main content
Module

x/ddc_vim/deps.ts>fn.getmatches

Dark deno-powered completion framework for neovim/Vim8
Go to Latest
function fn.getmatches
import { fn } from "https://deno.land/x/ddc_vim@v2.3.0/deps.ts";
const { getmatches } = fn;

Returns a |List| with all matches previously defined for the current window by |matchadd()| and the |:match| commands. |getmatches()| is useful in combination with |setmatches()|, as |setmatches()| can restore a list of matches saved by |getmatches()|. If {win} is specified, use the window with this number or window ID instead of the current window. Example: :echo getmatches() [{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}, {'group': 'MyGroup2', 'pattern': 'FIXME', 'priority': 10, 'id': 2}] :let m = getmatches() :call clearmatches() :echo getmatches() [] :call setmatches(m) :echo getmatches() [{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}, {'group': 'MyGroup2', 'pattern': 'FIXME', 'priority': 10, 'id': 2}] :unlet m

Parameters

denops: Denops
optional
win: unknown

Returns

Promise<unknown>