Fixing Sublime Text 2 line endings

line-endingssublimetext2

Here is my Settings - User config:

{
    "auto_indent": true,
    "color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
    "default_line_ending": "LF",
    "detect_indentation": true,
    "font_size": 10.0,
    "ignored_packages":
    [
        "Vintage"
    ],
    "indent_to_bracket": false,
    "smart_indent": true,
    "tab_size": 4,
    "translate_tabs_to_spaces": true,
    "trim_automatic_white_space": true,
    "use_tab_stops": true
}

Comment to default_line_ending option says:
Comment to default_line_ending option

When I create a new file, I check line ending here:

Check line ending

As you can see it's still Windows…
Any ideas?

Best Answer

The comment states

// Determines what character(s) are used to terminate each line in new files.
// Valid values are 'system' (whatever the OS uses), 'windows' (CRLF) and
// 'unix' (LF only).

You are setting

"default_line_ending": "LF",

You should set

"default_line_ending": "unix",