toppair / peek.nvim

Markdown preview plugin for Neovim
MIT License
624 stars 42 forks source link

Close window with normal system shortcuts #70

Open piersolenski opened 2 months ago

piersolenski commented 2 months ago

All applications on MacOS support cmd - Q in order to quit the application. Is it possible to support that with the pop up window?

A bonus would also be able to quit with simply q.

fmorroni commented 2 months ago

Hi, I don't use mac but isn't cmd - Q an operating system keybind? I don't think it should be something the plugin has to handle.

piersolenski commented 1 month ago

So the only way to close the window other than PeekClose is via the mouse? Just doesn't seem that vim-like 🤔 I understand this is in some ways outside of vim, but the popup window does support j/k for scrolling, so a binding to quit it too would be pretty nice...

fmorroni commented 1 month ago

Nono, what I mean is that you should already be able to close the window using your os keybind. If you can't I don't think it's a problem related to the plugin.

Although now that I think about it, the problem may be related to a recent change in input handling. I don't have this problem on Linux tho, but maybe Mac handles things differently.

I asume you're using webview? Can your try using the browser? Check out the readme on how to configure the plugin for that.

If it's what I think you shouldn't be able to close with cmd+q using the browser either.