Skip to content

Neovim plugin that displays keymaps from README.md in a floating window

License

Notifications You must be signed in to change notification settings

vsyaco/keymaps-help.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

keymaps-help.nvim

Neovim plugin that parses keymaps from a markdown README and displays them in a floating window with syntax highlighting.

Installation

Using lazy.nvim:

{
    'vsyaco/keymaps-help.nvim',
    opts = {},
}

Configuration

Default options:

{
    show_on_startup = true,                              -- show keymaps window on VimEnter
    keys = { '?', '<C-/>' },                             -- toggle keybindings
    readme_path = vim.fn.stdpath('config') .. '/README.md', -- path to README with keymaps
}

README format

The plugin looks for a ## Keymaps (or ## Key Mappings) section in your README. Under it, use ### subsections with markdown tables:

## Keymaps

### General

| Key | Action | Mode |
|-----|--------|------|
| `<leader>w` | Save file | n |
| `jk` | Exit insert mode | i |

### Navigation

| Key | Action | Mode |
|-----|--------|------|
| `<C-h>` | Move to left window | n |

Each table row must have three columns: Key (in backticks), Action, and Mode.

Usage

  • Press ? or <C-/> to toggle the keymaps window
  • Press q or Esc to close

About

Neovim plugin that displays keymaps from README.md in a floating window

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages