Notice: WC_Cart::get_cart_url is deprecated since version 2.5! Use wc_get_cart_url instead. in /home/wordpre2/public_html/wp-includes/functions.php on line 3831
Select Page

I find my self using Sublime Text on everyday basis, either I take some notes, or I work on a project, Sublime Text is my editor of choice. It’s free, it’s powerful and helps me to get the job done.

Sometimes I find my self working on a existing project or WordPress theme, and some times there are some empty/blank lines in the files. I recently find out that it’s actually very easy to delete those lines, without to many headaches. For example your file may look like this:


foo

bar

baz

qux

quux

and you want your file using a simple operation to look like this


foo
bar
baz
qux
quux

All you have to do is to follow bellow instructions and you are done:

On Windows press:
  • CTRL + H
  • or Click Find->Replace – from the top navigation menu

Make sure you have selected ‘regular expression’ by pressing:

  • Alt + R
  • or Click .* in the Find box.

In the Find What: field type: ^\n and Replace With: field leave it blank.

On Mac press:
  • Command + ALT + E
  • or Click Find->Replace – from the top navigation menu

Make sure you have selected ‘regular expression’ by pressing:

  • Command + Alt + R
  • or Click .* in the Find box.

In the Find What: field type: ^\n and Replace With: field leave it blank.
And you’re done.

About author

Young and dedicated fellow, which has playing with WordPress for 5 years now, likes everything about web design and web development.

View all author posts →

Share This