I am using NeoVim on mac with a plugin called SpaceVim that I really like. SpaceVim basically loads a ton of mappings all mapped to the space bar.

I also have added a ton of my own personal mappings, all mapped to the comma key.


When I use SpaceVim mappings, there is a description for each option. For example, if I press "[SPC]f" (this is the SpaceVim mapping for all maps related to files), it will show me a list of options and a description for each option. See photo below:

enter image description here

When I use my own mappings, Vim will show all the options, but I am not sure how to create descriptions for each option. For example, if I press ",m" (this is will show all of my "Miscellaneous" mappings), there is no description: enter image description here


Does anyone know how to add these descriptions to custom vim mappings (stored in vimrc file)?

UPDATE To clarify - I am trying to create mapping previews without the use of spacevim or any other plugin. I did find this plugin which looks promising, but still looking for simple a vim / neovim only solution (which may not exist). https://github.com/spinks/vim-leader-guide Also, custom mappings can be created via spacevim with custom previews (see here for docs - https://spacevim.org/documentation/#bootstrap-functions) but still hoping to find a vim / neovim only solution :)


  • 1
    Welcome to Vi&Vim SE. Please check the documentation before posting a question. Here's a freebie for a new contributor: spacevim.org/documentation/#mappings-guide (Took me five minutes to find this despite never having used SpaceVim.)
    – B Layer
    Commented Aug 17, 2021 at 15:45
  • 1
    @BLayer - sorry, to clarify, I am asking if this can be done easily without spacevim (purely in vim or neovim). I found this plugin which looks promising, but still sort of defeats the purpose of trying to do this purely in vim / neovim github.com/spinks/vim-leader-guide Commented Aug 17, 2021 at 17:56
  • 1
    That's a feature of SpaceVim. Native Vim has nothing of the sort. You'd have to code it up...which would be a waste of time, obviously, with a plugin(s) already doing it for you.
    – B Layer
    Commented Aug 17, 2021 at 18:23
  • 1
    Thanks B and Ben! That makes sense. @D.BenKnoble, very nice! I will have to check out your plugin! Looks like exactly what I'm looking for. Commented Aug 17, 2021 at 19:39
  • 1
    As filbranden said, whatever you come up with that works for you, post an answer! I might just convert my comment to an answer...
    – D. Ben Knoble
    Commented Aug 17, 2021 at 19:51

2 Answers 2


What @BLayer said in the comments is correct; I thought SpaceVim used a plugin for this, but now I believe they have custom code. You can write your own code to do it (which is what you need to do in a "pure vim" solution), but at that point (unless a plugin doesn't offer what you need), it's not any different from using one.

Shameless plug: I use my own https://github.com/benknoble/popsikey plugin for this. It creates regular mappings when popups aren't supported, though it uses some newer vim8 syntax. It doesn't quite support every map feature, as that's a task with diminishing returns in this declarative style.

Here's a screenshot, for fun:

enter image description here

It's actually surprisingly versatile, especially with the submenu support. Here are a few examples:


Since you mention neovim it has a native way to bind keys with a description, if you define it in the lua config file (init.lua), rather than the vimscript one (vimrc).


vim.keymap.set('n', ',f', telescope_find_files, {desc="fzf for files recursively"});

...where the first argument is the mode (here normal mode), the second the key combination (here ,f), the third what to do when the key combination is pressed and the fourth a table, which among other things can contain a description.

Specifically the desc should show up in that window you show a screenshot of, which is likely the plugin which-key. Unfortunately I don't know a native, easy way of making such a bind in the Vimscript configuration.

More information: https://neovim.io/doc/user/lua-guide.html#lua-guide-mappings

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.