import { vars } from "https://deno.land/x/ddc_vim@v4.3.0/deps.ts";
const { register } = vars;
Register (register
or r
)
import { Denops } from "../mod.ts";
import { register } from "../variable/mod.ts";
export async function main(denops: Denops): Promise<void> {
// Set register
await register.set(denops, "a", "world");
// Get register
console.log(await register.get(denops, "a"));
}
Note that register.get()
returns defaultValue
when the register is falsy.