VS Code + tinymist typst extension: re-attach the "ejected" preview?

I use the tinymist extension on VS Code to edit typst documents. I use the “Typst Preview: Preview Opened File” button to preview the document I’m editing. On the preview panel, there is a button called “Eject Preview Panel”. When you click on it, the preview is moved to the web browser. I like the feature, but my question is: How to move the preview back to VS Code?

The “Preview Opened File” button stops working. Closing the browser tab doesn’t do anything.

So far, all I’ve found that works is to “Reload” the typst-source-file tab on VS Code.

Reloading the tab seems to be the only option for now. There is an open issue about this bug, see #2192.

1 Like

Thanks for the information!

Sending the preview to the browser is useful particularly when you make an oral presentation using your typst-generated slides, which I happened to do several hours ago.

In particular, the “Typst Preview: Preview Opened file in Browser and Slide Mode” command on VS Code opens the presentation full-screen and in a one-slide-per-page mode on Chrome, the result looking like a PowerPoint presentation.

After my formal presentation, I also wanted to show the audience how VS Code + Typst works . . . when I had to reload the typst source and re-generate the preview to the right of the source tab.