Skip to main content
Module

x/denops_std/function/nvim/mod.ts>nvim_clear_autocmds

📚 Standard module for denops.vim
Go to Latest
function nvim_clear_autocmds
import { nvim_clear_autocmds } from "https://deno.land/x/denops_std@v6.4.0/function/nvim/mod.ts";

Clear all autocommands that match the corresponding {opts}. To delete a particular autocmd, see nvim_del_autocmd().

Parameters:

  • {opts} Parameters - event: (string|table) Examples: - event: "pat1" - event: { "pat1" } - event: { "pat1", "pat2", "pat3" }

        - pattern: (string|table)
          - pattern or patterns to match exactly.
            - For example, if you have `*.py` as that pattern for the
              autocmd, you must pass `*.py` exactly to clear it.
              `test.py` will not match the pattern.
    
          - defaults to clearing all patterns.
          - NOTE: Cannot be used with **{buffer}**
    
        - buffer: (bufnr)
          - clear only `autocmd-buflocal` autocommands.
          - NOTE: Cannot be used with **{pattern}**
    
        - group: (string|int) The augroup name or id.
          - NOTE: If not passed, will only delete autocmds not in any group.
    

Parameters

denops: Denops
opts: unknown

Returns

Promise<unknown>