smart computer use?

Avatar

Smart computer use? Maybe, maybe not.

Is Dreamweaver mysteriously double spacing all your code?

It was for me, at least. Recently at our office, after upgrading one of our developers to Dreamweaver CS4, I noticed that a lot site code now had mysterious double spacing. What the heck?

This was mainly an annoyance, as it didn’t rewrite code other than just double spacing every single damn line of code.

I noticed that it was happening to all the sites that the new guy (with Dreamweaver CS4) was working on.

Why was Dreamweaver mysteriously double spacing all his code?

It turns out that Dreamweaver CS4 (and probably other versions) by default downloads all php/html/css/asp/etc. files in ASCII mode. For some reason, when doing this, Dreamweaver double spaces all the code. Why? I have no idea, it sucks and is annoying and stupid.

The problem can be resolved by changing Dreamweavers configuration to download those types of code files as Binary when using FTP.

How to change FTP transfer to binary

There is no “easy” way to do this in Dreamweaver, which I found to be odd. Every other FTP app I’ve ever used has the option to choose transfer type of Binary or ASCII up front during transfers or in the FTP account setup/management screens. Not Dreamweaver. You need to edit a text file to change the FTP transfer type to binary for certain file types.

To find the file, go into the folder where Dreamweaver was installed and search for this file:

  • FTPExtensionMap.txt

The file was in the “Adobe Dreamweaver CS4\configuration\” folder on my computer.

In that file you will find a simple list of file types and FTP transfer types. Just change the files that are being double spaced to “Binary” as the transfer type, save the file, and you should be good to go. Problem solved!

I should mention that problems like this are why I now use Ultraedit.


4 Comments, Comment or Ping

  1. Scott

    Hi,

    Each time I download .txt files from my remote server, Dreamweaver CS3 inserts several blank lines between each line in the text file.

    I tried your above method, changing the transfer type from ASCII to Binary, but the .txt files are still coming in with several blank lines.

    Any other ideas on how to solve this pesky problem?

    Thanks in advance,
    ~Scott

  2. rob

    Thanks for this tip.. Worked a treat, it did..

  3. Jim

    Thanks soooo much. Worked great for me.

  4. lukemeister

    Glad I could help!

  5. Shawn

    Hi Scott,

    I’ve tried it and didn’t work neither. Then, I found below that worked for me:

    So to remove the double spaces I set: Dreamweaver>>Edit>>Preferences>>Code Format>>Line Break Type to “LF (Unix)” … problem solved!

Reply to “Is Dreamweaver mysteriously double spacing all your code?”