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

x/denops_std/autocmd/common.ts>list

๐Ÿ“š Standard module for denops.vim
Go to Latest
function list
import { list } from "https://deno.land/x/denops_std@v5.0.2/autocmd/common.ts";

List defined autocmds

import { Denops } from "../mod.ts";
import * as autocmd from "./mod.ts";

export async function main(denops: Denops): Promise<void> {
  // List all autocmd
  console.log(await autocmd.list(denops));

  // List all BufEnter autocmd
  console.log(await autocmd.list(denops, "BufEnter"));

  // List all BufEnter autocmd in buffer
  console.log(await autocmd.list(denops, "BufEnter", "<buffer>"));

  // List multiple autocmds
  console.log(await autocmd.list(denops, ["BufEnter", "WinEnter"]));
}

Parameters

denops: Denops
optional
event: "*" | AutocmdEvent | AutocmdEvent[]
optional
pat: string | string[]
optional
options: ListOptions = [UNSUPPORTED]

Returns

Promise<unknown>