Watch files for changes and reload them
Description
I often edit files and then run linter/formatter in other terminal tab. Some editors automatically reload files from disk on changes, while others provide keybinding to do this. So, I want to see this functionality in Edit.
Possible solutions
- Automatically reload files on external changes
- Provide actions for this:
- Add
File -> Reload From Diskaction and (maybe) keybinding - Add
File -> Reload All From Diskaction and (maybe) keybinding
- Add
Many editors use CTRL-R keybinding to reload files. I don't know which keybindings we can use since CTRL-R is already used for Replace and CTRL-SHIFT-R also calls it (#218).
Ctrl+R is the same as backspace in the VT model, so we can't use it for a reload keybinding.
I think watching files for changes is easy enough to do and worth adding as a feature, so we should do that. I'm not sure about adding an action for reloading files, so perhaps that may come at a later time.