Skip to main content
Module

x/denops_std/option/mod.ts>wildmenu

📚 Standard module for denops.vim
Go to Latest
variable wildmenu
import { wildmenu } from "https://deno.land/x/denops_std@v6.2.0/option/mod.ts";

When 'wildmenu' is on, command-line completion operates in an enhanced mode. On pressing 'wildchar' (usually <Tab>) to invoke completion, the possible matches are shown. When 'wildoptions' contains "pum", then the completion matches are shown in a popup menu. Otherwise they are displayed just above the command line, with the first match highlighted (overwriting the status line, if there is one). Keys that show the previous/next match, such as <Tab> or CTRL-P/CTRL-N, cause the highlight to move to the appropriate match. When 'wildmode' is used, "wildmenu" mode is used where "full" is specified. "longest" and "list" do not start "wildmenu" mode. You can check the current mode with wildmenumode(). If there are more matches than can fit in the line, a ">" is shown on the right and/or a "<" is shown on the left. The status line scrolls as needed. The "wildmenu" mode is abandoned when a key is hit that is not used for selecting a completion. While the "wildmenu" is active, the following keys have special meanings: CTRL-P - go to the previous entry CTRL-N - go to the next entry <CR> - in menu completion, when the cursor is just after a dot: move into a submenu. CTRL-E - end completion, go back to what was there before selecting a match. CTRL-Y - accept the currently selected match and stop completion.

When not using the popup menu for command line completion, the following keys have special meanings: <Left> <Right> - select previous/next match (like CTRL-P/CTRL-N) <Up> - in filename/menu name completion: move up into parent directory or parent menu. <Down> - in filename/menu name completion: move into a subdirectory or submenu.

When using the popup menu for command line completion, the following keys have special meanings: <Up> <Down> - select previous/next match (like CTRL-P/CTRL-N) <PageUp> - select a match several entries back <PageDown> - select a match several entries further <Left> - in filename/menu name completion: move up into parent directory or parent menu. <Right> - in filename/menu name completion: move into a subdirectory or submenu.

This makes the menus accessible from the console console-menus.

If you prefer the <Left> and <Right> keys to move the cursor instead of selecting a different match, use this:

:cnoremap <Left> <Space><BS><Left>
:cnoremap <Right> <Space><BS><Right>

The "WildMenu" highlighting is used for displaying the current match hl-WildMenu.

(default off, set in defaults.vim)