Skip to main content
Module

x/ddc_vim/deps.ts>execute

Dark deno-powered completion framework for neovim/Vim
Latest
function execute
Re-export
import { execute } from "https://deno.land/x/ddc_vim@v4.3.1/deps.ts";

Execute multi-lined Vim script directly

import { Denops } from "../mod.ts";
import { execute } from "../helper/mod.ts";

export async function main(denops: Denops): Promise<void> {
  await execute(
    denops,
    `
    command! CommandA echo "A"
    command! CommandB echo "B"
    command! CommandC echo "C"
    `,
  );

  // You can pass context like
  await execute(
    denops,
    `
    command! CommandA echo msg_a
    command! CommandB echo msg_b
    command! CommandC echo l:msg_c
    `,
    {
      msg_a: "Hello A",
      msg_b: "Hello B",
      msg_c: "Hello C",
    },
  );
}

Parameters

denops: Denops
script: string | string[]
optional
ctx: Context = [UNSUPPORTED]

Returns

Promise<void>