- open typst source in neovim:
nvim main.typ
- open typst watch in a separate terminal buffer to be able to see error messages
:e term://typst watch %
- silently open the pdf in mupdf
:!mupdf %<.pdf > /dev/null 2>&1 & disown
- silently refresh mupdf whenever the pdf file changes
:!while inotifywait -qq -e modify %<.pdf; do pkill -HUP mupdf; done & disown
- silently autowrite
.typ
file in current buffer whenever it changes
:autocmd TextChanged,TextChangedI <buffer> silent write
- to turn the silent autowrite off use
:autocmd! TextChanged,TextChangedI <buffer>