Wednesday, 12 July 2017

Remove blank lines in Sublime Text 3

I hope most of you guys have been using the Sublime Text 3 as your regular code editor and you must been encountered many code files having blank lines in the code and if you want to get rid of these you can use the simple ST3 feature to remove those blank line.

Windows OS user can follow the following instructions to remove the blank lines through ST3

As  you can seen in the screenshot below there are blank lines after each line.

First step is to press ctrl + H on your keyboard it will show the following screen.

the following options will appear at the bottom of the sublime window as mentioned in the screenshot

Make sure the "regular expression" option is selected, other options should not be selected and in "Find What" field put this code "^\n" and "Replace With" field should be blank.

after that click on "Replace All" and you will see the results as in the screenshot instantly.

You can make the comparison in the First and Last screenshot.

This is the fastest method/shortcut sublime provide to speed up your work.

Load disqus comments