I am using VSCode to edit Markdown files with the formatted preview to the side. Every time I edit a file, the preview updates. For long files full of TeX math, this can significantly slow down the editor. Is there a way to disable real-time updating, or only update on save?
Update: This doesn't appear to be possible in VSCode at the moment, even with an extension (see here: https://github.com/yzhang-gh/vscode-markdown/issues/991).
I've opened a feature request which is pending community review here:
https://github.com/microsoft/vscode/issues/129252
Update: The best solution I've found is to open a new Markdown file, do most of the editing there, and then paste it back into the main file.
Update: It turns out part of the slowness was having both the new built-in KaTex math renderer and an extension to do this running at the same time... This also seems to be why the preview would appear to refresh twice at times.
I've been using the Markdown All in One extension to render KaTex math.
Recently, the June 2021 update (1.58) introduced built-in KaTeX math rendering with the extension "Markdown Math" (which can be found in the Extensions tab and searching for @builtin
).
Running both math renderers at the same time seems to cause issues:
https://github.com/yzhang-gh/vscode-markdown/issues/1010
https://github.com/yzhang-gh/vscode-markdown/issues/1008
So the built-in one can be disabled with:
"markdown.math.enabled": false
Or Markdown All in One's math renderer can be disabled with:
"markdown.extension.math.enabled": false