Sublime Text 2: How to delete blank/empty lines
Select the text
Press:
- Ctrl + H on PC, or
- Command + Alt + F on Mac or
- Click Find->Replace.
Make sure you have selected 'regular expression' by pressing:
- Alt + R on PC or
- Command + Alt + R on Mac or
- Click .* in the Find box.
Find what: ^\n
or ^(\r|\n\r?)
Replace With: (nothing, leave in blank).
The regexp in Hugo's answer is correct when there is no spaces in the line. In case if there are space regexp can be ^\s+$