Visual Studio formatting tips
1 min readDec 30, 2017
To indent (format) the current file press CTRL + K, CTRL + D
To format only one part, select part of code and press CTRL + K, CTRL + F
To remove the white spaces from the file between the lines, press Ctrl + Shift + H, select replace in files, check use regular expression and paste into the “Find what”
^ (? ([^ \ R \ n]) \ r? $ \ r? \ n
And in “Replace with”, leave it blank.
If you want only the current file to change, select Look in: Current Document.