简体   繁体   中英

Collapse python comment in vs code

Not long ago, I started commenting a lot of code in python, the problem is that vs code does not offer me to reduce the comment.

I have tried single line comments and group comments but same issue..

python single line comment python multiline program

In other languages for example C.. it offers me in the bar a button to collapse

example in C

How can comment collapsing be enabled in VS?

I tried it. I think vscode itself provides this function, but I don't know why it doesn't work for you.

As can be seen from the figure, multiline annotations can be folded.

在此处输入图像描述

在此处输入图像描述

Of course, there is no solution for your situation. We can add #region before the content, add #endregion after it.

在此处输入图像描述

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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