hkupty / impromptu.nvim

Create prompts fast and easy
MIT License
39 stars 1 forks source link

Customizable quit key #41

Open resolritter opened 5 years ago

resolritter commented 5 years ago

It seems like q is hardcoded as a quit shortcut.

https://github.com/Vigemus/impromptu.nvim/blob/d8e1d078cd9adc7a27c618ca3fa13c0bb476525e/lua/impromptu/internals/ask.lua#L157

I usually quit out of things with <esc> or <c-c> so would like to customize this.

hkupty commented 5 years ago

The other forms are closed with <C-c>, so I think it makes sense to change this one as well.

resolritter commented 5 years ago

@hkupty I originally tried to solve this and https://github.com/Vigemus/impromptu.nvim/pull/42 by myself, but found no way to detect when the impromptu buffer opens. I've seen other libraries allow interaction upon opening either through:

As I understood you plan to change the default, right? I think it would make more sense for flexibility if one the interactions I listed above could be done. Just to be clear, what I wanted was a custom option which would allow me to customize the key, not directly change the defaults.

hkupty commented 5 years ago

I wanted to make the three forms behave somewhat the same way. That is converging with what you described.

I also want to make configuration more flexible and there's a way to do that through lua which can be mapped to viml as well, and I've started that already.

I'm sorry that it's not ready yet, but several things got in the way.

I'll probably be able to focus on that on the coming weeks.

Does that work for you?

resolritter commented 5 years ago

@hkupty I can't picture what it is, but any attempt is very appreciated. I'll be there to update the plugin and give feedback as soon as I can when you make the changes. Thank you for your work!