Remove empty lines in eclipse code editor by find/replace (Ctrl+F)

前端 未结 7 1139
轻奢々
轻奢々 2020-12-31 15:21

I want to remove all blank lines from my code by find/replace method in eclipse code editor.

I used regular expression \\n\\s*\\n to find all blank lin

7条回答
  •  一个人的身影
    2020-12-31 16:07

    I am not sure if it is the answer to your specific problem but the solution with the \r\ .. indicates it is an incompatibility between Windows and UNIX text encoding . So a simple solution will be to convert the file to UNIX encoding

    In Eclipse Menu -> File -> Convert line delimiter -> Unix

提交回复
热议问题