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

x/ddu_vim/deps.ts>autocmd.emit

Dark deno-powered UI framework for neovim/Vim
Go to Latest
function autocmd.emit
import { autocmd } from "https://deno.land/x/ddu_vim@v4.0.0/deps.ts";
const { emit } = autocmd;

Emit an autocmd in a buffer

import type { Denops } from "https://deno.land/x/denops_std@v4.0.0/mod.ts";
import * as autocmd from "https://deno.land/x/denops_std@v4.0.0/autocmd/mod.ts";

export async function main(denops: Denops): Promise<void> {
  // Emit an autocmd in a current buffer
  await autocmd.emit(denops, "BufEnter");

  // Emit multiple autocmds in a current buffer
  await autocmd.emit(denops, ["BufEnter", "WinEnter"]);

  // Emit an autocmd in a buffer 'Hello'
  await autocmd.emit(denops, "BufEnter", "Hello");
}

Parameters

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

Returns

Promise<unknown>