vimtricks.wiki Concise Vim tricks, one at a time.

How do I see available key mappings as I type?

Answer

vim-which-key plugin

Explanation

vim-which-key displays a popup showing available key bindings as you type a prefix key. It is like a cheat sheet that appears when you pause.

How it works

  • Press a prefix key (like <leader>) and wait
  • A popup appears showing all available mappings
  • Select the next key to execute the command

Example

After pressing <Space> (if it is your leader):

+-----+-----+-----+
| f   | g   | s   |
|Files|Git  |Save |
+-----+-----+-----+

Tips

  • Install: Plug 'liuchengxu/vim-which-key'
  • Requires configuration to define the mappings display
  • Neovim alternative: folke/which-key.nvim
  • Helps new users learn available key bindings
  • Customizable timeout before the popup appears

Next

How do you yank a single word into a named register?