Sublime Forum

default_line_ending seems to have no effect

#1

Hello! Big ST2 fan here.

I’ve created a project, but no matter what I do, I can’t get ST2 to switch to “default_line_ending”: “windows” line endings. Here’s what my project file looks like:

[code]{
“default_line_ending”: “windows”,
“folders”:

	{
		"path": "/projects/myprojectdir"
	}
]

}
[/code]
I launch the project in ST2, browse my folder tree, and open files for editing. When I go to View > Line Endings it always has “Unix” checked (I’m on OSX). My default preferences have "default_line_ending": "system" and in my user preferences, there is no default_line_ending directive.

This project is an old project where Windows line endings are standard and I’m causing quite a headache whenever I edit files!

0 Likes

#2

default_line_ending is only applied to new files. If you open an existing file, the line ending convention of that file will be maintained.

0 Likes

#3

I first tried diagnosing this issue by opening our project (Visual Studio calls them “solutions”) and looking for files I know I’ve never edited. These files have been created by other members of our team, which all use Visual Studio who all use Windows-style line endings (the default on VS).

All that to say, I’m pretty certain these files I’m opening us Windows line endings. But ST2 always has me editing with unix style line endings as I’ve described above.

0 Likes