I'm keen to know whether there is a way to stop Visual Studio Cntl + K + D hot function from resetting the indentation of my code for certain code sections?
Example is when I write html in javascript code, to make it more readable i like to apply my own indentations, as shown below:
let html =
'<div class="d-flex flex-column" style="height: 100%">' +
'<div class="d-flex">' +
'<div class="icon-heading">' +
'<i class="fa-solid fa-clipboard-list fa-1x"></i>' +
'<h6 class="ms-2 mt-2">User Ack Notes</h6>' +
'<!-- spinner = see layout.cshtml file -->' +
'</div>' +
'</div>' +
'</div>;
But as soon as i hiy Cntrl + K + D then VS will automatically remove these indentations, as shown below:
This is very annoying and would be great if some kind of a js tag could be added to stop VS from applying the removal of indentations. I often use Cntrl + K + D to tidy up all other code blocks so I couldnt afford to simply remove the code tidy up feature.