SkillAgentSearch skills...

Keymaps.nvim

:tangerine: a keymap manager for Neovim, simplifying keybinding management and customization.

Install / Use

/learn @comfysage/Keymaps.nvim
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Installation

using lazy.nvim:

return {
    'comfysage/keymaps.nvim',
    lazy = false,
    priority = 1000,
    opts = {
      -- default options given to `vim.keymap.set()`
      default_opts = {
        silent = true,
        noremap = true,
      },
    },
}

usage

first run:

require('keymaps').setup()

at the beggining of your config.

or using a protected call:

local ok, keymaps = pcall(require, 'keymaps')
if ok then keymaps.setup() end

then you can use the 'keymaps' global like this:

-- keymaps <mode> [<key>]        { <keymap>         <description>  }
keymaps.normal['<space><TAB>'] = { ":$tabedit<CR>", 'Open New Tab' }

-- possible modes are: normal, visual and insert

-- the keymap can also be a lua function, like this:
keymaps.normal["<C-t>"] = {
  function() require 'telescope.builtin'.colorscheme() end,
  'Find Colorscheme'
}
-- uses [@telescope](https://github.com/nvim-telescope/telescope.nvim)

-- you can also pass additional options to the keymaps
keymaps.normal["gg"] = { '<cmd>call smoothie#do("gg") <CR>', 'Scroll to top of file', { overwrite = true } }
keymaps.normal["G"] = { '<cmd>call smoothie#do("G") <CR>', 'Scroll to bottom of file', { overwrite = true } }
-- uses [@vim-smoothie](https://github.com/psliwka/vim-smoothie)

-- keymaps can also be grouped by passing a name to the `group` property:
keymaps.normal[',hp'] = { require 'gitsigns'.preview_hunk, '[Git] Preview Hunk', group = 'Git' }
keymaps.normal[',hs'] = { require 'gitsigns'.stage_hunk, '[Git] stage current hunk', group = 'Git' }
-- uses [@gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim)

Telescope Integration

Add the following to your nvim config to load the telescope extension

require('telescope').load_extension('keymaps_nvim')

to view your keymaps using telescope run the following

require('telescope').extensions.keymaps_nvim.keymaps_nvim()
View on GitHub
GitHub Stars19
CategoryDevelopment
Updated6mo ago
Forks1

Languages

Lua

Security Score

72/100

Audited on Sep 27, 2025

No findings