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

x/denops_std/autocmd/common.ts>remove

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

Remove an autocmd

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

export async function main(denops: Denops): Promise<void> {
  // Remove BufEnter autocmd
  await autocmd.remove(denops, "BufEnter", "*");

  // Remove any autocmd in buffer
  await autocmd.remove(denops, "*", "<buffer>");

  // Remove BufEnter autocmd in 'MyGroup'
  await autocmd.remove(denops, "BufEnter", "*", {
    group: "MyGroup",
  });

  // Remove multiple autocmds
  await autocmd.remove(denops, ["BufEnter", "WinEnter"], "*");
}

Parameters

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

Returns

Promise<void>