Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99415

Disable formatting on Visual Studio Code C++ formatter only for a block of the code

$
0
0

Is there a way to guide the formatter to not touch part of the C++ code in Visual Studio Code? For example:

// FORMAT THIS PART
int a;

// DON'T TOUCH THIS PART
std::map<int, std::set<int>> m = {
    {1, {2, 3, 4}},
    {2, {3, 4, 5}}
};
// END OF DON'T TOUCH THIS PART

Viewing all articles
Browse latest Browse all 99415

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>