Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[FEATURE] autocmd event to set up keybinds on the buffer

Open
#96 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
lua, neovim
Domain
tooling

Research direction

Start by reviewing the plugin's existing Claude Code buffer setup and the proposed ugaterm.nvim commit linked in the issue. Identify where the buffer is created or entered, add the requested User autocmd behavior there, and verify that buffer-local terminal and normal-mode keymaps can be registered through the shown callback pattern.

Written by the indexing model from the issue text.

Description

Feature Description

I want an autocmd User event for addding specific keybind on the claude code buffer.

Use Case

I want to toggle claudecode buffer with some keymap when the mode is terminal insert mode.

Proposed Solution

ugaterm.nvim has this feature.

https://github.com/uga-rosa/ugaterm.nvim/commit/c12135abec935e2b78e99d710bbe9c7a690ab36e

With this event, I can add autocmds like this, and can close ugaterm buffer from terminal insert mode with just hitting <Esc><Esc>.

vim.api.nvim_create_autocmd('User',
  {
    pattern = 'UgatermEnter',
    callback =
        function(args)
          vim.keymap.set('t', '<Esc>', '<C-\\><C-n>', { buffer = args.buf })
          vim.keymap.set('n', '<Esc>', '<cmd>UgatermHide<CR>', { buffer = args.buf })
        end
  })
Dominant language
Lua
Stars
3.1k
Forks
219
PR merge metrics
No merged PRs in 30d

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from coder/claudecode.nvim

All issues in coder/claudecode.nvim

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.