mdr icon indicating copy to clipboard operation
mdr copied to clipboard

Monitor mode

Open afranke opened this issue 5 years ago • 3 comments

It is quite common for people to want to preview the result as they edit a document. This could be done by having e.g. two terminal windows side by side, one with the editor and the other with mdr running. mdr would need to monitor the file for change.

  • That could be enabled with a --monitor flag (or something else if there is already something commonly used in other software that I am not aware of) and we probably don’t want mdr to be in this mode by default.
  • Scroll position needs to stay the same across reloads.
  • If for some reason the file is broken on reload (e.g. it was deleted, or it is breaking the markdown parser in any way) then it would be better to keep the previous state displayed (but maybe display a warning so authors know what’s up.

afranke avatar Jan 23 '20 14:01 afranke

Make sense to me. --watch maybe ?

MichaelMure avatar Jan 23 '20 17:01 MichaelMure

--watch sounds good. No idea if anything else uses it, but it works for me.

afranke avatar Jan 23 '20 18:01 afranke

Optionally, a hotkey for explicit reloading of currently rendered file would be nice, when the program isn't running with monitor mode on.

toolonely avatar May 16 '22 10:05 toolonely