Skip to main content
Module

x/denops_std/variable/mod.ts>options

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

Options (options or o)

import { Denops } from "../mod.ts";
import { options } from "../variable/mod.ts";

export async function main(denops: Denops): Promise<void> {
  // 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.