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

x/denops_std/variable/mod.ts>environment

๐Ÿ“š Standard module for denops.vim
Go to Latest
variable environment
import { environment } from "https://deno.land/x/denops_std@v6.4.0/variable/mod.ts";

Environment variables (environment or e)

import type { Denops } from "https://deno.land/x/denops_std@v6.4.0/mod.ts";
import { environment } from "https://deno.land/x/denops_std@v6.4.0/variable/mod.ts";

export async function main(denops: Denops): Promise<void> {
  // Set environment variable
  await environment.set(denops, "DENOPS_HELLO", "world");

  // Get environment variable
  console.log(await environment.get(denops, "DENOPS_HELLO"));

  // Remove environment variable
  await environment.remove(denops, "DENOPS_HELLO");
}