Skip to content

Commit

Permalink
Merge pull request #241 from vim-denops/exprstr-moduledoc
Browse files Browse the repository at this point in the history
📝 Add module document to `helper/expr_string`
  • Loading branch information
lambdalisue committed May 7, 2024
2 parents c90ab1b + 5526e51 commit 341fa18
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions helper/expr_string.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
/**
* A module to provide expression string function to represents Vim's string constant.
*
* ```typescript
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
* import * as fn from "https://deno.land/x/denops_std@$MODULE_VERSION/function/mod.ts";
* import {
* type ExprString,
* exprQuote as q,
* useExprString,
* } from "https://deno.land/x/denops_std@$MODULE_VERSION/helper/expr_string.ts";
*
* export async function main(denops: Denops): Promise<void> {
* // Create `ExprString` value with `exprQuote`.
* const vimKeySequence: ExprString = q`\<Cmd>echo 'foo'\<CR>`;
*
* // Use `ExprString` value in `useExprString` block.
* await useExprString(denops, async (denops) => {
* await fn.feedkeys(denops, vimKeySequence)
* await denops.cmd('echo value', { value: q`\U0001F680` })
* });
* }
* ```
*
* @module
*/

import type { Context, Denops, Dispatcher, Meta } from "../mod.ts";
import is from "https://deno.land/x/unknownutil@v3.16.3/is.ts";
import { execute } from "./execute.ts";
Expand Down

0 comments on commit 341fa18

Please sign in to comment.