Watch Mode
Overview
Watch mode monitors the current file for changes and automatically reloads the preview, preserving your scroll position.
Usage
leaf --watch README.md
leaf -w README.md
You can also toggle watch mode while viewing a file by pressing w.
How It Works
leaf polls the file’s modification timestamp. When a change is detected, it re-reads and re-parses the file, then re-renders at the current scroll position. A brief flash indicator confirms the reload.
Configuration
Set watch mode as default in ~/.config/leaf/config.toml:
watch = true