{"id":51601144,"url":"https://github.com/abdul-hamid-achik/keymaps.nvim","last_synced_at":"2026-07-11T22:02:39.902Z","repository":{"id":331705599,"uuid":"1131876341","full_name":"abdul-hamid-achik/keymaps.nvim","owner":"abdul-hamid-achik","description":"Auto-detect and display all your Neovim keymaps in a beautiful, searchable cheatsheet","archived":false,"fork":false,"pushed_at":"2026-01-10T22:52:16.000Z","size":36,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-11T06:39:11.469Z","etag":null,"topics":["cheatsheet","keymaps","lua","neovim","neovim-plugin","nvim","telescope"],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abdul-hamid-achik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-10T21:39:21.000Z","updated_at":"2026-01-11T03:35:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/abdul-hamid-achik/keymaps.nvim","commit_stats":null,"previous_names":["abdul-hamid-achik/keymaps.nvim"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/abdul-hamid-achik/keymaps.nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdul-hamid-achik%2Fkeymaps.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdul-hamid-achik%2Fkeymaps.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdul-hamid-achik%2Fkeymaps.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdul-hamid-achik%2Fkeymaps.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abdul-hamid-achik","download_url":"https://codeload.github.com/abdul-hamid-achik/keymaps.nvim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdul-hamid-achik%2Fkeymaps.nvim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35376136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-11T02:00:05.354Z","response_time":104,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cheatsheet","keymaps","lua","neovim","neovim-plugin","nvim","telescope"],"created_at":"2026-07-11T22:02:35.052Z","updated_at":"2026-07-11T22:02:39.897Z","avatar_url":"https://github.com/abdul-hamid-achik.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003ekeymaps.nvim\u003c/h1\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eAuto-detect and display all your Neovim keymaps in a beautiful, searchable cheatsheet\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cem\u003eby \u003ca href=\"https://github.com/abdul-hamid-achik\"\u003eAbdul Hamid Achik\u003c/a\u003e\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://neovim.io\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Neovim-0.8+-blueviolet.svg?style=for-the-badge\u0026logo=neovim\u0026logoColor=white\" alt=\"Neovim\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.lua.org\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Lua-5.1+-blue.svg?style=for-the-badge\u0026logo=lua\u0026logoColor=white\" alt=\"Lua\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge\" alt=\"License: MIT\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#-features\"\u003eFeatures\u003c/a\u003e •\n  \u003ca href=\"#-quick-start\"\u003eQuick Start\u003c/a\u003e •\n  \u003ca href=\"#-installation\"\u003eInstallation\u003c/a\u003e •\n  \u003ca href=\"#%EF%B8%8F-configuration\"\u003eConfiguration\u003c/a\u003e •\n  \u003ca href=\"#-commands\"\u003eCommands\u003c/a\u003e •\n  \u003ca href=\"#-api\"\u003eAPI\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Why keymaps.nvim?\n\nEver wondered \"what was that keymap again?\" or wanted to see all your keymaps in one place? **keymaps.nvim** automatically discovers every keymap in your Neovim config and presents them in a searchable, categorized cheatsheet.\n\n- No manual registration required\n- Works with any plugin's keymaps\n- Knows which plugin defined each keymap\n- Export to Markdown, HTML, or JSON for documentation\n\n## ✨ Features\n\n| Feature | Description |\n|---------|-------------|\n| **Auto-detection** | Scans all keymaps via `nvim_get_keymap()` across all modes (n, i, v, x, s, o, c, t) |\n| **Vim Motions Built-in** | Includes 220+ Vim motions with descriptions (h/j/k/l, w/e/b, text objects, operators, and more) |\n| **Smart Categorization** | Automatically groups keymaps into categories: LSP, Git, Navigation, Harpoon, Telescope, and more |\n| **Source Detection** | Uses `debug.getinfo()` to identify which plugin defined each keymap |\n| **Telescope Integration** | Beautiful fuzzy finder with preview (graceful fallback to floating window) |\n| **Export** | Generate Markdown, interactive HTML, or JSON documentation |\n| **Usage Tracking** | Track which keymaps you actually use and see statistics |\n| **Auto-refresh** | Automatically updates when your config files change |\n| **Zero Config** | Works out of the box with sensible defaults |\n\n## 🎯 Built-in Vim Motions\n\nkeymaps.nvim includes **220+ Vim motions** with clear descriptions, so you get a complete reference alongside your custom keymaps:\n\n| Category | Examples |\n|----------|----------|\n| **Character/Word** | `h` `j` `k` `l` `w` `e` `b` `W` `E` `B` `ge` |\n| **Line** | `0` `^` `$` `g_` `+` `-` `\\|` |\n| **Vertical** | `gg` `G` `{` `}` `(` `)` `[[` `]]` `%` |\n| **Screen** | `H` `M` `L` `\u003cC-f\u003e` `\u003cC-b\u003e` `\u003cC-d\u003e` `\u003cC-u\u003e` `zz` `zt` `zb` |\n| **Search/Find** | `/` `?` `n` `N` `*` `#` `f` `F` `t` `T` `;` `,` |\n| **Jumps** | `\u003cC-o\u003e` `\u003cC-i\u003e` `gd` `gD` `gf` `\u003cC-]\u003e` `g;` `g,` |\n| **Text Objects** | `iw` `aw` `ip` `ap` `i)` `a)` `i\"` `a\"` `it` `at` |\n| **Operators** | `d` `c` `y` `\u003e` `\u003c` `=` `gq` `gu` `gU` |\n| **Commands** | `dd` `yy` `cc` `p` `P` `u` `\u003cC-r\u003e` `.` `J` |\n| **Diff/Spell** | `[c` `]c` `[s` `]s` `z=` `zg` |\n| **Folds** | `zo` `zc` `za` `zR` `zM` `zj` `zk` |\n| **Windows** | `\u003cC-w\u003es` `\u003cC-w\u003ev` `\u003cC-w\u003eh/j/k/l` `\u003cC-w\u003e=` |\n\n\u003e **Smart deduplication**: If you've remapped a motion (e.g., `gd` for LSP), your version takes precedence.\n\nDisable with `include_motions = false` if you prefer a leaner view.\n\n## 🚀 Quick Start\n\n```lua\n-- lazy.nvim (recommended)\n{\n  \"abdul-hamid-achik/keymaps.nvim\",\n  opts = {},\n  keys = {\n    { \"\u003cleader\u003e?\", \"\u003ccmd\u003eKeymaps\u003ccr\u003e\", desc = \"Show Keymaps\" },\n  },\n}\n```\n\nThen press `\u003cleader\u003e?` to open the cheatsheet!\n\n## 📦 Installation\n\n### [lazy.nvim](https://github.com/folke/lazy.nvim)\n\n```lua\n{\n  \"abdul-hamid-achik/keymaps.nvim\",\n  dependencies = {\n    \"nvim-telescope/telescope.nvim\", -- optional, for fuzzy finding\n  },\n  opts = {\n    -- your configuration (see below)\n  },\n  keys = {\n    { \"\u003cleader\u003e?\", \"\u003ccmd\u003eKeymaps\u003ccr\u003e\", desc = \"Show Keymaps\" },\n  },\n}\n```\n\n### [packer.nvim](https://github.com/wbthomason/packer.nvim)\n\n```lua\nuse {\n  \"abdul-hamid-achik/keymaps.nvim\",\n  requires = {\n    \"nvim-telescope/telescope.nvim\", -- optional\n  },\n  config = function()\n    require(\"keymaps\").setup({\n      -- your configuration\n    })\n  end,\n}\n```\n\n### [vim-plug](https://github.com/junegunn/vim-plug)\n\n```vim\nPlug 'nvim-telescope/telescope.nvim' \" optional\nPlug 'abdul-hamid-achik/keymaps.nvim'\n\nlua require(\"keymaps\").setup()\n```\n\n### Manual\n\n```bash\ngit clone https://github.com/abdul-hamid-achik/keymaps.nvim \\\n  ~/.local/share/nvim/site/pack/plugins/start/keymaps.nvim\n```\n\n## ⚙️ Configuration\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eClick to expand full configuration\u003c/strong\u003e\u003c/summary\u003e\n\n```lua\nrequire(\"keymaps\").setup({\n  -- Main keybinding to open the cheatsheet (set to \"\" to disable)\n  key = \"\u003cleader\u003e?\",\n\n  -- Use telescope if available, fallback to floating window\n  telescope = true,\n\n  -- Show nerd font icons (requires a nerd font)\n  icons = true,\n\n  -- Include vim builtin keymaps\n  include_builtins = false,\n\n  -- Include buffer-local keymaps (from netrw, help, etc.)\n  -- Set to false to hide noisy internal keymaps\n  include_buffer_local = false,\n\n  -- Include standard Vim motions and commands (h/j/k/l, w/e/b, text objects, etc.)\n  -- These are merged with your custom keymaps for a complete reference\n  include_motions = true,\n\n  -- Enable usage tracking\n  track_usage = false,\n\n  -- Auto-refresh when config files change\n  auto_refresh = true,\n\n  -- Cache timeout in seconds (0 = no cache)\n  cache_timeout = 300,\n\n  -- Category patterns for auto-categorization\n  -- Keys are matched against these patterns to determine category\n  category_patterns = {\n    [\"LSP\"] = {\n      \"^g[dDrRiItT]\",\n      \"^\u003cleader\u003el\",\n      \"^\u003cleader\u003ec[aAdDfFrRsS]\",\n      \"hover\", \"diagnostic\", \"definition\", \"references\",\n    },\n    [\"Git\"] = {\n      \"^\u003cleader\u003eg\",\n      \"^\u003cleader\u003eh\",\n      \"gitsigns\", \"fugitive\", \"neogit\", \"lazygit\",\n    },\n    [\"Navigation\"] = {\n      \"^\u003cC%-[hjkl]\u003e\",\n      \"^\u003cleader\u003ew\",\n      \"^\u003cleader\u003eb\",\n      \"buffer\", \"window\", \"split\",\n    },\n    [\"Harpoon\"] = { \"harpoon\", \"^\u003cleader\u003ea\" },\n    [\"Telescope\"] = { \"telescope\", \"^\u003cleader\u003ef\", \"^\u003cleader\u003es\" },\n    [\"File Explorer\"] = { \"^\u003cleader\u003ee\", \"nvim%-tree\", \"neo%-tree\", \"oil\" },\n    [\"Editing\"] = { \"yank\", \"paste\", \"delete\", \"surround\" },\n    [\"Comments\"] = { \"^gc\", \"^gb\", \"comment\" },\n    [\"Debugging\"] = { \"dap\", \"debug\", \"breakpoint\" },\n    [\"Testing\"] = { \"^\u003cleader\u003et\", \"neotest\", \"test\" },\n    [\"Terminal\"] = { \"terminal\", \"toggleterm\" },\n    -- Add your own!\n    [\"Custom\"] = { \"my_pattern\" },\n  },\n\n  -- Patterns to exclude from display\n  exclude_patterns = {\n    \"^\u003cPlug\u003e\",\n    \"^\u003cSNR\u003e\",\n  },\n\n  -- Icons for categories (requires nerd font)\n  category_icons = {\n    [\"LSP\"] = \"\",\n    [\"Git\"] = \"\",\n    [\"Navigation\"] = \"\",\n    [\"Harpoon\"] = \"󱡀\",\n    [\"Telescope\"] = \"\",\n    [\"File Explorer\"] = \"\",\n    [\"Editing\"] = \"\",\n    [\"Comments\"] = \"\",\n    [\"Debugging\"] = \"\",\n    [\"Testing\"] = \"\",\n    [\"Terminal\"] = \"\",\n    [\"Other\"] = \"\",\n  },\n\n  -- Icons for modes\n  mode_icons = {\n    n = \"󰰓\",  -- Normal\n    i = \"󰰄\",  -- Insert\n    v = \"󰰫\",  -- Visual\n    x = \"󰰵\",  -- Visual Block\n    s = \"󰰢\",  -- Select\n    o = \"󰰑\",  -- Operator\n    c = \"󰯲\",  -- Command\n    t = \"󰰥\",  -- Terminal\n  },\n})\n```\n\n\u003c/details\u003e\n\n### Minimal Config\n\n```lua\nrequire(\"keymaps\").setup() -- That's it! Uses sensible defaults\n```\n\n## 📋 Commands\n\n| Command | Description |\n|---------|-------------|\n| `:Keymaps` | Open the keymaps cheatsheet |\n| `:Keymaps LSP` | Filter by category (with tab completion!) |\n| `:KeymapsRefresh` | Refresh the keymaps cache |\n| `:KeymapsExport markdown` | Export to `keymaps.md` |\n| `:KeymapsExport html` | Export to searchable `keymaps.html` |\n| `:KeymapsExport json` | Export to `keymaps.json` |\n| `:KeymapsStats` | Show usage statistics |\n\n## ⌨️ Keybindings\n\n### Default\n\n| Key | Action |\n|-----|--------|\n| `\u003cleader\u003e?` | Open keymaps cheatsheet |\n\n### Telescope Picker\n\n| Key | Action |\n|-----|--------|\n| `\u003cCR\u003e` | Copy keymap to clipboard |\n| `\u003cC-x\u003e` | Execute the keymap |\n| `\u003cEsc\u003e` | Close |\n\n### Floating Window\n\n| Key | Action |\n|-----|--------|\n| `q` / `\u003cEsc\u003e` | Close |\n| `/` | Search |\n| `r` | Refresh |\n\n## 🔌 API\n\n```lua\nlocal keymaps = require(\"keymaps\")\n\n-- Get all keymaps\nlocal all = keymaps.get_keymaps()\n\n-- Search keymaps\nlocal results = keymaps.search(\"telescope\")\n\n-- Filter by category or mode\nlocal lsp = keymaps.get_by_category(\"LSP\")\nlocal normal = keymaps.get_by_mode(\"n\")\n\n-- Get available categories\nlocal categories = keymaps.get_categories()\n\n-- Export\nkeymaps.export_to(\"markdown\", \"~/keymaps.md\")\nkeymaps.export_to(\"html\", \"~/keymaps.html\")\nkeymaps.export_to(\"json\", \"~/keymaps.json\")\n\n-- Open UI\nkeymaps.open()           -- all keymaps\nkeymaps.open(\"Git\")      -- filtered\n\n-- Refresh cache\nkeymaps.refresh()\n```\n\n## 🆚 Comparison\n\n### vs which-key.nvim\n\n| | keymaps.nvim | which-key.nvim |\n|---|:---:|:---:|\n| Auto-detect keymaps | ✅ | ❌ |\n| Popup on keypress | ❌ | ✅ |\n| Searchable cheatsheet | ✅ | Limited |\n| Export to files | ✅ | ❌ |\n| Plugin source detection | ✅ | ❌ |\n| Usage tracking | ✅ | ❌ |\n\n\u003e **Pro tip**: Use both together! which-key shows hints as you type, keymaps.nvim gives you the full searchable reference.\n\n### vs cheatsheet.nvim\n\n| | keymaps.nvim | cheatsheet.nvim |\n|---|:---:|:---:|\n| Auto-detect keymaps | ✅ | Partial |\n| Bundled cheatsheets | ❌ | ✅ |\n| Custom cheatsheet files | ❌ | ✅ |\n| HTML export with search | ✅ | ❌ |\n| Smart categorization | ✅ | Limited |\n\n## 🍳 Recipes\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eTrack your most used keymaps\u003c/strong\u003e\u003c/summary\u003e\n\n```lua\nrequire(\"keymaps\").setup({\n  track_usage = true,\n})\n\n-- Then run :KeymapsStats to see what you actually use!\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eAuto-export on quit\u003c/strong\u003e\u003c/summary\u003e\n\n```lua\nvim.api.nvim_create_autocmd(\"VimLeavePre\", {\n  callback = function()\n    require(\"keymaps\").export_to(\"markdown\", \"~/.config/nvim/KEYMAPS.md\")\n  end,\n})\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eAdd custom categories for AI tools\u003c/strong\u003e\u003c/summary\u003e\n\n```lua\nrequire(\"keymaps\").setup({\n  category_patterns = {\n    [\"AI\"] = {\n      \"copilot\",\n      \"codeium\",\n      \"chatgpt\",\n      \"^\u003cleader\u003ea\",\n    },\n  },\n  category_icons = {\n    [\"AI\"] = \"󰚩\",\n  },\n})\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eShow only custom keymaps (hide builtins)\u003c/strong\u003e\u003c/summary\u003e\n\n```lua\nrequire(\"keymaps\").setup({\n  include_builtins = false,\n  exclude_patterns = {\n    \"^\u003cPlug\u003e\",\n    \"^\u003cSNR\u003e\",\n    \"^%w$\",  -- Single character keys\n  },\n})\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eUse with dashboard\u003c/strong\u003e\u003c/summary\u003e\n\n```lua\n-- For alpha.nvim or dashboard.nvim\nlocal function get_keymap_count()\n  return #require(\"keymaps\").get_keymaps()\nend\n\n-- Display: \"You have 142 keymaps configured\"\n```\n\n\u003c/details\u003e\n\n## 🔧 Troubleshooting\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eKeymaps not showing up?\u003c/strong\u003e\u003c/summary\u003e\n\n1. Make sure your plugins are loaded before calling `:Keymaps`\n2. Try `:KeymapsRefresh` to clear the cache\n3. Check if keymaps are excluded by `exclude_patterns`\n4. Run `:lua print(vim.inspect(require(\"keymaps\").get_keymaps()))` to debug\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eIcons not displaying correctly?\u003c/strong\u003e\u003c/summary\u003e\n\nMake sure you have a [Nerd Font](https://www.nerdfonts.com/) installed and configured in your terminal. Alternatively, disable icons:\n\n```lua\nrequire(\"keymaps\").setup({\n  icons = false,\n})\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eTelescope not working?\u003c/strong\u003e\u003c/summary\u003e\n\nEnsure telescope.nvim is installed and loaded. The plugin will automatically fall back to a floating window if Telescope isn't available.\n\n\u003c/details\u003e\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 📄 License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n## 🙏 Acknowledgments\n\n- Inspired by [which-key.nvim](https://github.com/folke/which-key.nvim) and [cheatsheet.nvim](https://github.com/sudormrfbin/cheatsheet.nvim)\n- Thanks to the amazing Neovim community\n\n---\n\n\u003cp align=\"center\"\u003e\n  Made with ❤️ by \u003ca href=\"https://github.com/abdul-hamid-achik\"\u003eAbdul Hamid Achik\u003c/a\u003e for the Neovim community\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdul-hamid-achik%2Fkeymaps.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdul-hamid-achik%2Fkeymaps.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdul-hamid-achik%2Fkeymaps.nvim/lists"}