Bug: Does not reload file contents if changed externally (e.g. an IDE)
We can probably implement something using fs.watch() to do this!
Agreed, like in Notepad++ or any other editor, it would monitor/watch file contents change in real-time and notify the user - whether to load changes or ignore / keep as is - so user can choose either option then continue
I think it would be good if it reloaded silently unless there are unsaved changes. In the latter case, it could behave like VSCode or Vim, prompting the user only upon saving with a message like this:
WARNING: The file has been changed since reading it!!!
Do you really want to write to it (y/n)?
@codebytere would love to implement this, can I try ?
@codebytere I found two ways, we can implement this, it's by using the fs.watch as u had mentioned or we can use chokidar which is a watcher and would help in duplicate event triggers while watching and would handle it properly. Although the package is maintained and it gets updated regularly. should there be a solution which adds a dependency to the fiddle or should it be handled by fs