[FEATURE] autocmd event to set up keybinds on the buffer
未关闭
还没有人认领这个 Issue。
- 主要语言
- Lua
- 星标
- 3.1k
- 派生
- 217
- PR 合并指标
- 30 天内没有已合并 PR
描述
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
})
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先检查 plugin 现有的 Claude Code 缓冲区设置,以及 issue 中链接的拟议 ugaterm.nvim 提交。确定缓冲区是在何处创建或进入的,在那里添加所请求的 User autocmd 行为,并验证是否可以通过所示的 callback 模式注册缓冲区本地的终端和普通模式键映射。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- lua, neovim
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100