Fix Dreamweaver Double-Spaced Code

Dreamweaver Find and Replace

Due to Unix/Linux/Windows server environments, when you are editing code locally in Dreamweaver you’ll sometimes find your code double-spaced for the whole file.

A quick fix is to run this find/replace command to remove the extra spaces.

  1. Hit CTRL-F or command F to bring up the Find/Replace dialog box.
  2. In the Find box enter “[\r\n]{2,}” (without the quotes).
  3. In the replace box enter “\n” (without the quotes).
  4. Make sure the box for “Use regular expression” is checked and click Replace All.

You may also wish to experiment with the Code Format options under Edit > Preferences. In your preferences you can specify a “line break type” (server type)… though admittedly the options there provide no permanent fix for me. Good luck and happy coding!

TLDR;   [\r\n]{2,}   \n

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)  (3)  (3)  (4)  (1)  (1)  (2)  (1)  (7)  (10)  (12)  (2)  (6)  (1)  (3)  (16)  (2)  (3)  (1)  (5)  (1)  (27)  (4)  (4)  (9)