How to delete blank lines in Notepad++

Notepad++ is one of my favorite programming tools. It is easy to use after installation.
Notepad++ provides a lot of convenient plug-ins to achieve more extensions, of course, it is already more powerful and easy to use.
If you encounter a lot of blank lines in the middle of the text, then you can use Notepad++ to easily do it as follows:
Method 1 (plug-in processing):
first download and install the plugin TextFX, restart after downloading, and then find TextFX in the menu bar -> TextFX Edit -> Delete blank lines, that's it.
Method 2 (regular processing):
Select Replace, set the search mode to regular expression, enter ^\s+ in the search box, leave the replacement box blank, and click "Replace All" (select all first).

Method 3. Delete blank lines (excluding blank lines with space symbols) 
1. Press ctrl+h to replace the escape character with \r\n 
, jump out of the search and replace box, and define the search mode as extended (\n, \r… ) 
find target: \r\n\r\n 
is replaced by: \r\n

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325346939&siteId=291194637