Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I select (or simply delete) every other line in Sublime Text?

If I edit a WordPress template in Sublime Text 2 after it has been edited in the WordPress editor, every other line is blank. I'd like to remove those ... del del del del is getting really annoying.

Note this is different from deleting all blank lines (i.e., Sublime Text 2: How to delete blank/empty lines). Some lines are intentionally blank.

like image 680
Timothy Aaron Avatar asked Dec 21 '22 11:12

Timothy Aaron


1 Answers

Find what: \n\n

Replace with: \n

If the blank lines are odd, put the cursor on line 2. Otherwise, put the cursor on line 1.

Click Replace All

like image 173
nhahtdh Avatar answered Mar 22 '23 23:03

nhahtdh