admin管理员组文章数量:1346676
The VS Code TextDocument
type has a save
method which saves the document normally; if autoformatting is enabled then that will run before saving. Separately, as documented in #38695, there exists a workbench.action.files.saveWithoutFormatting
command which can be executed programmatically to save the document associated with the active text editor, without triggering autoformatting.
However, I don't see a way to use the latter with a document that is not associated with the active text editor. Does the VS Code API provide a way to save an arbitrary TextDocument
without formatting?
本文标签: In a VS Code extensionhow can I save a nonactive document without formattingStack Overflow
版权声明:本文标题:In a VS Code extension, how can I save a non-active document without formatting? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743829288a2546222.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论