Skip to main content
Module

x/denops_std/helper/expr_string.ts>useExprString

📚 Standard module for denops.vim
Go to Latest
function useExprString
import { useExprString } from "https://deno.land/x/denops_std@v6.4.0/helper/expr_string.ts";

Call the denops function using Vim's string constant format.

import type { Denops } from "https://deno.land/x/denops_std@v6.4.0/mod.ts";
import * as fn from "https://deno.land/x/denops_std@v6.4.0/function/mod.ts";
import { exprQuote as q, useExprString } from "https://deno.land/x/denops_std@v6.4.0/helper/expr_string.ts";

export async function main(denops: Denops): Promise<void> {
  await useExprString(denops, async (denops) => {
    await fn.feedkeys(denops, q`\<Cmd>echo 'foo'\<CR>`)
    await denops.cmd('echo value', { value: q`\U0001F680` })
  });
}

Type Parameters

T extends unknown

Parameters

denops: Denops
executor: (helper: ExprStringHelper) => Promise<T>

Returns

Promise<T>