-1

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://markdown-all-in-one.github.io/docs/guide/compatibility.html#rendering-for-math-in-the-markdown-preview

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

kriem
  • 1
  • 2

1 Answers1

0

I suggest shutting the webview / panel and then only opening when you need to. I'm pretty sure you can find extensions that only update on save, but I'm not sure.

  • This is ok but steals focus from the editor. I haven't been able to find an extension so far. – kriem Jul 22 '21 at 02:47
  • Yea, sucks. If you go to the slack vscode (just google it) and ask and put it as an idea someone will make it. –  Jul 22 '21 at 10:07