Skip to main content
Latest
function fn.matcharg
import { fn } from "https://deno.land/x/denops_lsputil@v0.9.4/deps.ts";
const { matcharg } = fn;

Selects the {nr} match item, as set with a :match, :2match or :3match command. Return a List with two elements: The name of the highlight group used The pattern used. When {nr} is not 1, 2 or 3 returns an empty List. When there is no match item set returns ['', '']. This is useful to save and restore a :match. Highlighting matches using the :match commands are limited to three matches. matchadd() does not have this limitation.

Can also be used as a method:

GetMatch()->matcharg()

Parameters

denops: Denops
nr: unknown

Returns

Promise<unknown[]>