简体   繁体   English

注释折叠的代码块会使它在Visual Studio代码中展开

[英]Commenting a block of folded code causes it to unfold in visual studio code

let's say I have a simple javascript method. 假设我有一个简单的javascript方法。

http.createServer(function (req, res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end('Hello World!');
}).listen(8080);

If I fold this in visual studio code and comment it, the code unfolds automatically. 如果我在Visual Studio代码中将其折叠并注释,则代码会自动展开。 Is there a way to stop this? 有办法阻止这种情况吗?

It looks like you have to use block comments to comment folded code and have it remain folded. 看来您必须使用块注释来注释折叠的代码并使它保持折叠状态。

Shift - Alt - A Shift - Alt - A

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM