Sambeau Wang
Sambeau Wang

Reputation: 3

How to fold the commented code in vs code?

In Vscode, How to fold the commented/inactived code region? Lua Code lua code or cpp Code cpp code

They are unabled to fold the code which is commented or inactived. such as in visual studio folded code

Upvotes: 0

Views: 295

Answers (1)

corriedotdev
corriedotdev

Reputation: 19

Its a known bug.

https://github.com/microsoft/vscode-cpptools/issues/407

An alternative could be to encapsulate your unwanted code into a region.

#region Accessors
// Commented code
#endregion

The alternative commenting mechanism

/*  

// More code
// commented code youre not interested in

*/

Here is an extension that has been made which attempts to solve the issue

https://github.com/reapler/vscode-cfold

Upvotes: 1

Related Questions