Skip to main content
Module

x/denops_std/variable/mod.ts>options

📚 Standard module for denops.vim
Latest
variable options
import { options } from "https://deno.land/x/denops_std@v6.5.0/variable/mod.ts";

Options (options or o)

import type { Entrypoint } from "https://deno.land/x/denops_std@v6.5.0/mod.ts";
import { options } from "https://deno.land/x/denops_std@v6.5.0/variable/mod.ts";

export const main: Entrypoint = async (denops) => {
  // Set option
  await options.set(denops, "filetype", "world");

  // Get option
  console.log(await options.get(denops, "filetype"));

  // Reset option
  await options.remove(denops, "filetype");
}

Note that options.get() returns defaultValue when the option is falsy.