Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ddc_vim/deps.ts>fn.searchpairpos

Dark deno-powered completion framework for neovim/Vim
Go to Latest
function fn.searchpairpos
import { fn } from "https://deno.land/x/ddc_vim@v4.0.2/deps.ts";
const { searchpairpos } = fn;

Same as searchpair(), but returns a List with the line and column position of the match. The first element of the List is the line number and the second element is the byte index of the column position of the match. If no match is found, returns [0, 0].

:let [lnum,col] = searchpairpos('{', '', '}', 'n')

See match-parens for a bigger and more useful example.

Parameters

denops: Denops
start: unknown
middle: unknown
end: unknown
optional
flags: unknown
optional
skip: unknown
optional
stopline: unknown
optional
timeout: unknown

Returns

Promise<unknown[]>