import { autocmd } from "https://deno.land/x/ddc_vim@v3.9.1/deps.ts";
const { define } = autocmd;
Define an autocmd
import { Denops } from "../mod.ts";
import * as autocmd from "./mod.ts";
export async function main(denops: Denops): Promise<void> {
// Define new autocmd for BufEnter
await autocmd.define(denops, "BufEnter", "*", "echo 'BufEnter'");
// Define new autocmd for BufEnter in 'MyGroup'
await autocmd.define(denops, "BufEnter", "*", "echo 'BufEnter'", {
group: "MyGroup",
});
// Define new autocmd for BufEnter with '++once'
await autocmd.define(denops, "BufEnter", "*", "echo 'BufEnter'", {
once: true,
});
// Define new autocmd for BufEnter with '++nested'
await autocmd.define(denops, "BufEnter", "*", "echo 'BufEnter'", {
nested: true,
});
// Define multiple autocmds
await autocmd.define(denops, ["BufEnter", "WinEnter"], "*", "echo 'Enter'");
}