2

When I open certain files through FTP with Sublime Text 2, such as .css or .php files, ST2 adds an extra line break after every line. The result is a lot of unnecessary white space that make the files difficult to scan and clean up again.

Can someone please instruct me how to set the preferences to where no extra line breaks are added when I open my files?

Much appreciated.

lockedown
  • 594
  • 6
  • 15
  • 4
    Sounds like your FTP server or Sublime Text 2 config has badly configured new lines \r\n vs. \n http://stackoverflow.com/questions/2613800/how-to-convert-dos-windows-newline-to-unix-newline-in-bash-script You need to first figure out how newlines are handled and which part of your software stack breaks them – Mikko Ohtamaa Feb 04 '13 at 22:00

1 Answers1

5

Go to Settings - Default and find this option -

// Set to true to ensure the last line of the file ends in a newline
// character when saving
"ensure_newline_at_eof_on_save": false,
Bibhas Debnath
  • 14,559
  • 17
  • 68
  • 96
  • If you would like to preserve this setting even if Sublime Text updates save it to the `Settings - User` file. Hope that helps. – Chris Spiegl May 05 '14 at 19:13