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

If I edit the WordPress template in Sublime Text 2 after editing it in the WordPress editor, each line will be empty. I would like to remove them ... del del del del becomes very annoying.

Note that this is different than deleting all blank lines (i.e. Sublime Text 2: deleting blank / blank lines ). Some lines are intentionally empty.

+4
source share
1 answer

Find what: \n\n

Replace with: \n

If the empty lines are odd, place the cursor on line 2. Otherwise, place the cursor on line 1.

Click Replace All

+10
source

All Articles