如何禁用 sublime 完成字符串文字并保持自动缩进

How can I disable sublime completing string literals and keep auto-indent

每当我在 sublime 中键入 ' 时,它都会添加终止引号 ' 并将光标放在中间,如下所示:'|'

扩展为 "|"" 也是如此。

这对我来说是不受欢迎的行为,我发现关闭它的唯一方法是设置:

"auto_indent": false,

然而,这使得编写缩进代码变得很麻烦。

有没有办法让 Sublime 不完成字符串文字并保留 auto_indent

我在 Windows 上的 Sublime 3 Build 3114 和 Linux 上的 Sublime 3 Build 3083 上测试了这个。

设置的名称应该是 auto_match_enabled,正如您在默认键绑定中看到的那样:

// Auto-pair quotes
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"[=10=]\""}, "context":
    [
        { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
        { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
        { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\)|]|\}|>|$)", "match_all": true },
        { "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\"a-zA-Z0-9_]$", "match_all": true },
        { "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true }
    ]
},