c3er / mdview

Standalone Markdown viewer
MIT License
84 stars 8 forks source link

'Esc to exit' option request #7

Closed yozhic closed 4 years ago

yozhic commented 4 years ago

Close the program when Escape key is pressed. There are several known viewers that do have this option in preferences, e.g. WinDjView, SumatraPDF, etc. I think it would be really appreciated to get this option also in mdview.

For example, I'm currently using mdview as the main quick markdown-viewer in conjunction with Total Commander. I call mdview with the Alt+F3 — native TC hotkey, which send the file under the cursor to an external viewer (customized by extension). It's very comfortable. In this case, the ability to close the program by Esc would be very useful.

c3er commented 4 years ago

Good to know

  1. that anyone else finds my tool useful and
  2. for what use case it is used

Your request for an option is a little problematic, because the tool is not yet configurable at all. But changing the behavior to close the window via pressing Esc is no big hassle. I don't have preferences in this regard.

Only problem with this approach is the raw text view (Ctrl+U) that you can leave via Esc. I see 2 approaches:

  1. Esc closes the raw text view but not the window yet. You have to press Esc twice, if you are currently in the raw text view.
  2. Use another key (combination) to leave the raw text view. I think it is more intuitive, if the raw text view is left via pressing Ctrl+U again.

I prefer option 2. But do you have any preferences? Do you use the raw text view at all?

yozhic commented 4 years ago

anyone else finds my tool useful

Someone who wasn't too lazy to write an issue 😉 I'm sure this tool is useful and people use it. I was looking for a simple viewer without a lot of things, but with a quality markdown rendering. Some are monsters. Some aren't good at rendering. mdview hit the golden mean (imho of course).

I prefer option 2.

I totally agree with you. E.g. Total Commander follows the same logic: same hotkey activates and deactivates an option.

Do you use the raw text view at all?

No, but I think this option is necessary. It can be useful for complex files with rendering problems. But I haven't seen one yet (considering that the mdview renders well).

c3er commented 4 years ago

I released version 1.4.1.

Don't hesitate to open feature requests / bugs again :)