Skip to content

Live Reload

When another program changes an open file, for example a server writing to its log, Vaste reloads the file so you see the current content. Vaste reloads automatically when it notices a change, and you can reload at any time.

Press Ctrl + R, select Reload in the toolbar, or select More actions (…) → Reload. While Vaste reloads, the status bar shows Reloading…, and the Reload command is dimmed until it finishes.

If the file has not changed, a reload shows no notification, but it still clears search results and the other items in What a reload keeps and clears.

With the Auto reload setting on, Vaste watches the open file and reloads it 300 milliseconds after it stops changing. A file that is written without pauses reloads at least every 2 seconds; press Ctrl + R to reload it sooner. The setting is on by default, in the General settings under File changes. The status bar shows Auto reload on or Auto reload off. To change it, open Settings.

Turn Auto reload off when a file changes often and you want to read it without interruption, for example to keep Grep view open. Press Ctrl + R when you want to see the changes.

Most log files only grow: new lines are added at the end, and the existing lines stay the same. Vaste detects this case and reads only the added part, so the reload is quick even for a large file.

After such a reload:

  • A notification shows how many lines were added, for example 42 new lines, with Jump to new content. Select it to scroll to the first new line.
  • In Text view, a green bar marks the new lines for 30 seconds, and a marker beside the scrollbar shows where they start.
  • Saved filters with an alert run on the new lines. When an alert matches, its notification replaces the one for the new lines. See Alerts while tailing.

Vaste does not scroll to the new lines by itself. Select Jump to new content, or press End to go to the last line.

Vaste reads only the added lines when the file grew and its existing content did not change. It reads the whole file instead when the file is encoded as UTF-16, or when more than 64 MiB was added since the last reload, for example after Auto reload was off for a while.

If the file was truncated, rewritten, or replaced, or if Vaste cannot read only the added lines, it reads the whole file again and rebuilds its line index. The notification shows File changed on disk followed by the number of lines in the file, not the number of lines that changed.

After a full rebuild, Vaste marks pinned results as stale, because the lines they point to may have moved.

If the reload fails, Vaste shows Reload failed and the reason, and also marks pinned results as stale.

A reload keeps:

  • Your scroll position.
  • The search pattern and options.
  • Bookmarks.
  • The table column layout.

A reload clears:

  • Search results, Grep view, and combined searches.
  • The line selection, the byte cursor, and the hex analysis results.
  • Table filters and sorts.
  • Data quality results, unless the file’s content did not change.

After a reload, the search pattern is still in the search panel: press Enter to search again. Bookmarks keep their line numbers, so if lines were added or removed above a bookmark, it then marks a different line. See Bookmarks.

If a file is deleted while it is open, Vaste tries to reload it and shows a message that starts with Reload failed: I/O error. The last loaded content stays on screen.

If a log rotator renames the file and creates a new file with the same name, Vaste reloads the new file in full.

On Windows, another program can rename or delete the open file, but it cannot truncate it in place while the file has not changed since Vaste opened it. After Vaste sees the first change, it reads the file in a way that allows truncation too.

For a compressed file, Vaste watches the archive and decompresses it again when it changes. See Reloading a compressed file.