Auto format if statements
I find a lot of the time when I am coding if statements, if I alter them to have an if become an if && || instead, I'll end up with indents all over the pl开发者_如何转开发ace. Some will be tabbed once, some tabbed twice, turning back to once and back to twice sometimes - depending on how many changes I have done.
I was curious if there was a key that would auto format indents so my code would look like it was properly indented again. Thanks a lot for any answers.
The default shortcut key to auto-format code in Visual Studio is Ctrl + E, D
Other environment settings might also have it configured as Ctrl + K, Ctrl + D
精彩评论