Sublime Forum

Delete empty lines

#1

The option of deleting all empty lines would be a great addition to an otherwise great editor

0 Likes

#2

You could do something like this:
cmd+f
turn on regex mode (leftmost toggle button)
search for ā€œ^\s*$ā€ without the quotes
find all
backspace

If you want only completely empty lines and not just blank ones, search for ā€œ^$ā€ instead.

0 Likes

#3

Thank you!

This saved me :smile:

0 Likes

#4

Iā€™m using windows 10.

This does not work for me.

Any ideas?

0 Likes

#5

You might not have Search by Regular Expressions active, you can verify this by checking the icons on the left of the search window.

0 Likes