Skip to main content
Module

x/denops_std/function/vim/mod.ts>inputdialog

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

Like input(), but when the GUI is running and text dialogs are supported, a dialog window pops up to input the text. Example:

:let n = inputdialog("value for shiftwidth", shiftwidth())
:if n != ""
:  let &sw = n
:endif

When the dialog is cancelled {cancelreturn} is returned. When omitted an empty string is returned. Hitting <Enter> works like pressing the OK button. Hitting <Esc> works like pressing the Cancel button. NOTE: Command-line completion is not supported.

Can also be used as a method:

GetPrompt()->inputdialog()

Parameters

denops: Denops
prompt: unknown
optional
text: unknown
optional
cancelreturn: unknown

Returns

Promise<string>