Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

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

๐Ÿ“š Standard module for denops.vim
Go to Latest
function menu_info
import { menu_info } from "https://deno.land/x/denops_std@v3.6.0/function/vim/mod.ts";

Return information about the specified menu {name} in mode {mode}. The menu name should be specified without the shortcut character ('&'). {mode} can be one of these strings: "n" Normal "v" Visual (including Select) "o" Operator-pending "i" Insert "c" Cmd-line "s" Select "x" Visual "t" Terminal-Job "" Normal, Visual and Operator-pending "!" Insert and Cmd-line When {mode} is omitted, the modes for "" are used. Returns a |Dictionary| containing the following items: accel menu item accelerator text |menu-text| display display name (name without '&') enabled v:true if this menu item is enabled Refer to |:menu-enable| icon name of the icon file (for toolbar) |toolbar-icon| iconidx index of a built-in icon modes modes for which the menu is defined. In addition to the modes mentioned above, these characters will be used: " " Normal, Visual and Operator-pending name menu item name. noremenu v:true if the {rhs} of the menu item is not remappable else v:false. priority menu order priority |menu-priority| rhs right-hand-side of the menu item. The returned string has special characters translated like in the output of the ":menu" command listing. When the {rhs} of a menu item is empty, then "" is returned. script v:true if script-local remapping of {rhs} is allowed else v:false. See |:menu-script|. shortcut shortcut key (character after '&' in the menu name) |menu-shortcut| silent v:true if the menu item is created with argument |:menu-silent| submenus |List| containing the names of all the submenus. Present only if the menu item has submenus. Returns an empty dictionary if the menu item is not found. Examples: :echo menu_info('Edit.Cut') :echo menu_info('File.Save', 'n') Can also be used as a |method|: GetMenuName()->menu_info('v')

Parameters

denops: Denops
name: unknown
optional
mode: unknown

Returns

Promise<unknown>