Clean Up Double Line Spacing Code View in Dreamweaver

When downloading files from your server to edit in code view in Dreamweaver you’ll sometimes be looking at code that is all double spaced. You can fix this by doing a find/replace right in Dreamweaver.

With the page open, hit CTRL-F and enter \n\s*\n and type Ctrl-Enter in the replace box, making sure the “Use regular expressions” box is ticked.

This should clean things right up for you.

If you’re wondering why this double spacing happens it’s because you’re downloading files from the server that has differently encoded line returns in it. For example your server is Unix and your local environment is Windows.

You can (supposedly) permanently fix these compatibility issues under your Dreamweaver preferences options. Go to Preferences, Code Format, and make sure your Line Break Type is set to the same as your server. I haven’t always had luck with this but wanted you to know the option is there.

Tags: , ,

Leave a Reply

Other tags used in my blog:

 (1)  (6)  (1)  (16)  (1)  (1)  (17)  (1)  (16)  (1)  (1)  (7)  (1)  (4)  (15)  (5)  (2)  (27)  (9)  (1)  (11)  (4)  (4)  (4)  (8)  (1)  (6)  (1)  (4)  (1)  (1)  (1)  (3)  (1)  (3)  (4)  (7)  (2)  (3)  (4)  (1)  (1)  (2)  (1)  (7)  (9)  (11)  (2)  (6)  (1)  (3)  (16)  (2)  (3)  (1)  (5)  (1)  (26)  (4)  (4)  (9)