PureDevOps Community

Remove all empty lines in vscode , ultradedit, atom, sublime editors

There are many ways to do this either using a tool , custom scritps , regex or inbuilt option in the editors like notepad++. But here I am going to share a simplest solution which I am using regularly in my day to day activities .

Just do find option usually CTRL + F or CMD + F and

  1. put this value ^(?:[\t ]*(?:\r?\n|\r))+ and enable regex find .
  2. in the replace option if you prefer just one empty line then add \n else leave empty.

Apply and enjoy the magic of formatted code

1 Like