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

x/denops_std/autocmd/common.ts>emitAll

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

Emit an autocmd in all buffers

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

export async function main(denops: Denops): Promise<void> {
  // Emit an autocmd in all buffers
  await autocmd.emitAll(denops, "BufEnter");

  // Emit multiple autocmds in all buffers
  await autocmd.emitAll(denops, ["BufEnter", "WinEnter"]);

  // Emit an autocmd in all buffers match with 'Hello'
  await autocmd.emitAll(denops, "BufEnter", "Hello");
}

Parameters

denops: Denops
event: AutocmdEvent | AutocmdEvent[]
optional
fname: string
optional
options: EmitOptions = [UNSUPPORTED]

Returns

Promise<unknown>