Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ddc_vim/deps.ts>op.wildmenu

Dark deno-powered completion framework for neovim/Vim
Go to Latest
variable op.wildmenu
import { op } from "https://deno.land/x/ddc_vim@v4.0.2/deps.ts";
const { wildmenu } = op;

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, not using the popup menu, the following keys have special meanings:

<Left> <Right> - select previous/next match (like CTRL-P/CTRL-N) <Down> - in filename/menu name completion: move into a subdirectory or submenu. <CR> - in menu completion, when the cursor is just after a dot: move into a submenu. <Up> - in filename/menu name completion: move up into parent directory or parent menu.

When using the popup menu for command line completion, the following keys have special meanings: <Down> - select next match (like CTRL-N) <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. <Up> - select previous match (like CTRL-P) CTRL-E - end completion, go back to what was there before selecting a match. CTRL-N - go to the next entry CTRL-P - go to the previous entry CTRL-Y - accept the currently selected match and stop completion.

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)

type

GlobalOption<boolean>