Remove spaces from Dreamweaver

At times I work with files that have a lot of extra space in the file.

There are two ways to remove the extra line spacing

1)

  • Hit Ctrl + F.
  • In the Find box, hit Ctrl + M Twice.
  • In the Replace box, hit Ctrl + M once. This will remove the extra line spacing.

The only problem with this is that any indenting that you previously had is removed.

The below way will remove the extra line spacing, but will allow you to keep the indenting:

2)

  • Click Ctrl + F
  • Select “Current document” in “Find in” (You can also select the folder if you have multiple files)
  • Search in “Source code”
  • Tick “Use regular expression”
  • Type “[\r\n]{2,}” (without quotes) in “Find”
  • Type “\n” (without quotes) in “Replace”
  • Press “Replace All”

You may also like...