[FEATURE] autocmd event to set up keybinds on the buffer
- Lingua principale
- Lua
- Stelle
- 3.1k
- Fork
- 216
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
## 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 ``.
```lua
vim.api.nvim_create_autocmd('User',
{
pattern = 'UgatermEnter',
callback =
function(args)
vim.keymap.set('t', '', '', { buffer = args.buf })
vim.keymap.set('n', '', 'UgatermHide', { buffer = args.buf })
end
})
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.