Sometimes it's useful to rerun a task whenever a file changes; whether that's a linter or a test suite, or a preview. I recently wanted to recompile a TeX file to PDF whenever I saved a change, and it was easy with inotify, using instructions from superuser.
To install inotify on a Debian derivative you can use sudo apt install inotify-tools.
Then you can set it to run a command whenever a file is done saving.