nothingislost / obsidian-hover-editor

Transform the Page Preview hover into a working editor instance
MIT License
563 stars 21 forks source link

FR: add key command to show (unpinned) popover for link under cursor #25

Open lilruffian opened 2 years ago

lilruffian commented 2 years ago

This would be handy for vim users. The core popover functionality is tied to mouse placement - which is great, but if you're moving through a note with vim, it's always a pain to always reposition the mouse to activate the popover.

Being able to quickly view a popover for a link under cursor would be like macOS quick look. I'd assign this to something like cmd-y to mirror the default macOS command for quick look. I'd assign the pinned version of "open link under cursor in popover" you already provided to something else, like cmd-o.

Dope plugin, btw. This thing is a serious game changer

nothingislost commented 2 years ago

Thanks for the feedback. This makes sense and it pretty easy to add in. For now I guess you can always ctrl+w to close out of it quickly.

nothingislost commented 2 years ago

When invoking an unpinned popover using the keyboard, what action would be needed for the popover to be dismissed? Any key press? Keyboard movement to move the cursor away from the link text?

lilruffian commented 2 years ago

Great to hear that it's an easy thing to add. To dismiss the popover, I suppose esc would be most natural. On macOS cmd y will toggle a quicklook window. Cmd y to activate, cmd y to deactivate.

lilruffian commented 2 years ago

Hey @nothingislost, is this still something you're planning to add to the plugin? I hope so!