Skip to main content
Module

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

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

Just like popup_create() but with these default options:

call popup_create({what}, #{
        \ pos: 'center',
        \ zindex: 200,
        \ drag: 1,
        \ border: [],
        \ padding: [],
        \ mapping: 0,
        \})

Use {options} to change the properties. E.g. add a 'filter' option with value 'popup_filter_yesno'. Example:

call popup_create('do you want to quit (Yes/no)?', #{
        \ filter: 'popup_filter_yesno',
        \ callback: 'QuitCallback',
        \ })

By default the dialog can be dragged, so that text below it can be read if needed.

Can also be used as a method:

GetText()->popup_dialog({})

Parameters

denops: Denops
what: unknown
options: unknown

Returns

Promise<number>