Skip to main content
Module

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

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

Filter that can be used for a popup. These keys can be used: j <Down> <C-N> select item below k <Up> <C-P> select item above <Space> <Enter> accept current selection x Esc CTRL-C cancel the menu Other keys are ignored. Always returns v:true.

A match is set on that line to highlight it, see popup_menu().

When the current selection is accepted the "callback" of the popup menu is invoked with the index of the selected line as the second argument. The first entry has index one. Cancelling the menu invokes the callback with -1.

To add shortcut keys, see the example here: popup_menu-shortcut-example

Parameters

denops: Denops
id: unknown
key: unknown

Returns

Promise<number>