Skip to content

File-change watching

The editor watches every open file and notices when it changes on disk — when another program rewrites it, when you pull new changes in version control, or when a file you have open is deleted. This keeps the view in sync with the real state of your files and helps you avoid overwriting work done elsewhere.

What happens when a file changes

  • Modified externally — you're notified so the view never silently shows stale content. From the notification you can:
    • Reload the file to pick up the external changes, or
    • Compare the on-disk version against what you have open (see Compare / Diff).
  • Deleted externally — you're notified that the file is gone, so you can re-save it from the buffer you still have open if you want to keep it.

If a file changes while it isn't the tab you're looking at, the editor doesn't interrupt you — it waits and asks the next time you switch to that tab.

Quiet by design

Saving from the editor does not trigger a false "changed on disk" alert — the editor recognises its own writes. Notifications are debounced so a burst of external writes (e.g. a build tool rewriting a file) results in a single prompt, not a flurry.

A file that keeps changing only asks once — you won't get a new prompt on every write while you keep your version. The editor asks again the next time you switch back to that tab (in case you want to pick up the newer content then). If you'd rather follow the changes live instead of being asked, use Monitoring.

Monitoring a file (tail -f)

When another program is continuously appending to a file — a log, a build output, a report being generated — you usually want to follow it rather than be asked to reload. Turn on View ▸ Monitoring (tail -f) for the active file and the editor will:

  • Follow the tail — new lines appended on disk are added to the view and the editor scrolls to the end so the latest content stays visible.
  • Hold the buffer read-only — while monitoring, the file mirrors what's on disk, so editing is disabled (the document-changing commands grey out) and the file is never saved over. This is deliberate: you're watching a file another program owns, and writing your copy back would clobber what it's appending.

Toggle the same menu item off to stop following; the buffer becomes editable again, keeping whatever was on screen.

Starting to monitor a file with unsaved edits asks first — Discard & Monitor throws away your edits and follows the file on disk, or Cancel leaves the file as it is. There is no "save first" option, because saving would overwrite the file the other program is writing.

Monitoring is per-file and is not remembered between sessions — reopen a file and it starts as a normal, editable document. Only saved files can be monitored.

Tip

For structured log work — filtering by level, timelines, merging several sources, following rotation across app.logapp.log.1 — open the file in the dedicated Log Analyzer instead. Monitoring here is the lightweight "just watch this file grow" option for any file.