Visual Studio 2019 clean up the blank line problem (non-regular expression)

Opening topic: regular expression method effect=0

(The effect will be mentioned below)

Blank line question:
VS: In the course of VS to automatically organize not satisfied, because it would not automatically delete blank lines
when this happens, when, really silent, VS ctrl KD is not going to ignore blank lines, And there is no way to customize the formatting,
Insert picture description hereso VS needs a formatting code function/plug-in.
Here is recommended CodeMaid this plug-in can format the code well, mainly empty lines can be cleaned up directly.
Insert picture description here
In addition, use regular expressions in the replacement. It's not a good way (regular expressions are basically used to search and remove spaces on the Internet), one is to copy and paste each time (CodeMaid can directly clean up the format of the entire project),

The other is that there is a possibility of error, such as this.
Insert picture description here
Another example:
Insert picture description here
using codeMaid to clean up the entire project code, all files can be formatted , you only need to make a cup of tea, go to the toilet, and everything is resolved.
Insert picture description here
Insert picture description here
Insert picture description here
In addition, CodeMaid is in Chinese, which is very friendly and can be easily customized.
Insert picture description here
It can also be combined with Reshper's formatting scheme.
Insert picture description here
Finally, if you use it well, give the author a good comment. Open source and free, this plugin is worth 5 stars

CodeMaid review and download address

Guess you like

Origin blog.csdn.net/euphorias/article/details/105227817