Remove whitespace lines from visual studio code

Posted On // Leave a Comment
The simplest way to do could just using the inbuilt find and replace in visual studio.

Open find and replace or press Ctrl + H  and then 
in find "\n\n"  and replace section add "\n" and make sure the regular expressions checkbox is checked. 

Note you can build a macro and use it along with file saving function to achieve this automatically while saving a file.  

Caution: If you are using a team server or team repository make sure you don't remove white space because it can produce lot of conflicts with files of other people when you commit


Happy Coding

0 comments:

Post a Comment