Skip to content

feature: Add the possibility to override grapple vim.cmd.close bindings #185

Open
@aristidebm

Description

@aristidebm

Did you check the docs?

  • I have read the Grapple docs

Is your feature request related to a problem? Please describe.

First and foremost, thank you guys for this very useful piece of software, here is my problem

I hit the <esc> (a.k.a C-[) a lot in my workflow, for that reason I unexpectedly close grapple window so many times in a day, so I have decided to see if there is a way to disable this keybindings, but unfortunately I have found nothing that can help, I have tried to hook into ftplugin/grapple.lua in order to delete these keybindings, I have also tried to set keys = {} inside the settings, but I was unlucky.

So I have decided to check the code and see if it can help, I have noticed that those keybindings are hardcoded in this

function Window:create_buffer_defaults(buf_id)
and I don't know how I can override these keybidings without maintaining a fork.

My questions are

  1. Is there already a way to delete/override these keybindings ?
  2. If no is there a workaround that you guys think I can implement to solve this problem ?

Thanks

Describe the solution you'd like

I think a long solution is to provide a way to the user to completly remove defaults bindings set by grapple, something like

{
  "default_keybindings": false
}

In settings

Describe alternatives you've considered

I have tried to hook into ftplugin/grapple.lua in order to delete these keybindings, I have also tried to set keys = {} inside the settings, but I was unlucky.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions