import { vars } from "https://deno.land/x/ddc_vim@v4.1.0/deps.ts";
const { globals } = vars;
Global variables (globals
or g
)
import { Denops } from "../mod.ts";
import { globals } from "../variable/mod.ts";
export async function main(denops: Denops): Promise<void> {
// Set global variable
await globals.set(denops, "hello", "world");
// Get global variable
console.log(await globals.get(denops, "hello"));
// Remove global variable
await globals.remove(denops, "hello");
}