yoshuawuyts / vmd

:pray: preview markdown files
MIT License
1.18k stars 111 forks source link

search as-you-type #114

Open Haroenv opened 6 years ago

Haroenv commented 6 years ago

right now you need to press enter before a search is executed. A nicer experience is search while you are typing, and thus listening to the input event.

I can open the PR if there's interest

Haroenv commented 6 years ago

Something even cooler is to have some fuzzy search too

maxkueng commented 6 years ago

Great idea. We currently use a module called electron-in-page-search that does the searching. Maybe it can be configured to do search-as-you-type. There's also a related issue #108 which is currently quite annoying. (fixed)

I think it should behave similar to how search behaves in a web browser. Fuzzy search doesn't really make sense for searching inside a document.

If you're familiar with JavaScript or Electron you are more than welcome to give it a go. I can also try to help you if you have any questions.