DW8 Find & Replace \n

I just found out something really cool in DreamWeaver 8’s Find & Replace, here’s the crack…

I had a compressed & optimised CSS file, with no line breaks. Thing is that I needed a version WITH line breaks so that it can be worked on a bit easier THEN optimised and compressed.

Trouble is that DreamWeaver doesn’t appear to have the option I wanted… I wanted to replace every brace character } with a brace } and a new line/ carriage return/ line feed. I checked DreamWeaver’s Help and it didn’t enlighten me.

So I just went ahead and did what I thought might work, taking the CRLF knowledge from PHP into DreamWeaver, making sure, because this was a test, to only apply the Find & Replace to the current document ;)

Find: }

Replace: }\n

Replace All

It worked!

Obviously if your CSS is fully compressed you can give every single selector a line break with find & replace on opening braces { and replace with {\n and replace every semicolon ; with ;\n

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Blogplay
  • FriendFeed
  • LinkedIn
  • Reddit
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter

Leave a Reply