Sublime Forum

Sublime Text 4: Double Spacing in all files after Downloading with FileZilla

#1

Problem
I’m not sure if the category “General Discussion” or “Technical Support” applies here and I have been struggling with this problem every since I switched to Sublime Text from Dreamweaver. I had it in my head that the problem must be in Sublime Text because I haven’t changed my normal process and the problem didn’t exist with Dreamweaver.

My normal process is to edit files and upload the changes while in Sublime Text, but I juggle between work and home syncing from the server. In order to speed up the syncing and avoid accidently uploading an old version of a given file overwriting a newer file I sometimes download everything for a given project from the server to the local drive using FileZilla.

I finally figured out the problem accidently when I opened a downloaded file in Notepad++ and there was double spacing, but when the same file is opened in regular Notepad there is single spacing. This told me the problem was in FileZilla. It turned out to be a setting in FileZilla.

Solution
FileZilla by default has an FTP Type setting set to “Auto”. I tried changing it to “ASCII” and it had the same double spacing problem, but when changed to “Binary” the problem was solved. The setting is located under Edit->Settings->Transfers->FTP: File Types, change the setting to “Binary”. I hope this is helpful information for someone.

NOTE

For what it is worth, I opened an offending file in a hex editor and found that each line ends in a CRLF x0Dx0A if FileZilla is downloading from a Windows computer but the lines end in LF x0A when FileZilla is downloading from a Mac or Linux computer. This is normal and always has been. The real problem is that the Windows Textbox object that Notepad++ and Sublime Text uses creates a newline for CR and another newline for LF, hence the double spacing. This can also happen when pasting from the clipboard.
Perhaps a little more information than is needed but what the heck.

0 Likes