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

前端 未结 7 1122
轻奢々
轻奢々 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:21

    I tried your expression, and it combined some lines. I found this one to work:

    \n\s*$
    

    with a replacement of [nothing].

    Can't help with the mysterious error, though. I wonder if you have a corrupt file, maybe a stray CR/LF confusion.

    (As for a plugin... don't know of any, but, well, learn awk, sed, perl... they'll always serve you well for your miscellaneous text-mangling jobs.)

提交回复
热议问题