小编典典

修复 Sublime Text 2 行尾?

all

这是我的Settings - User配置:

{
    "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
}

default_line_ending选项的评论说: 注释 default_line_ending
选项

当我创建一个新文件时,我检查以此处结尾的行:

检查行尾

如您所见,它仍然是 Windows… 有什么想法吗?


阅读 67

收藏
2022-08-15

共1个答案

小编典典

评论指出

// 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).

你在设置

"default_line_ending": "LF",

你应该设置

"default_line_ending": "unix",

2022-08-15