Autocomplete 修改引号的自动匹配,为升华文本2添加额外的引号字符

Autocomplete 修改引号的自动匹配,为升华文本2添加额外的引号字符,autocomplete,sublimetext2,Autocomplete,Sublimetext2,升华文本2非常有帮助地关闭了我的所有引用。 可以修改它使用的字符吗 例如,如果我想在列表中添加'backticks' @斯库罗达的答案非常有效。在Mac OSX上,转到 Sublime Text 2>首选项>键绑定-用户 并将文本粘贴到那里。确保它最终被包装在[…](方括号)中。自动配对只是一些专门的键绑定。这应该允许您自动配对回勾。如果要创建其他自动配对符号,它还应作为指南 { "keys": ["`"], "command": "insert_snippet", "args": {"con

升华文本2非常有帮助地关闭了我的所有引用。
可以修改它使用的字符吗

例如,如果我想在列表中添加'backticks'


@斯库罗达的答案非常有效。在Mac OSX上,转到

Sublime Text 2>首选项>键绑定-用户


并将文本粘贴到那里。确保它最终被包装在
[…]
(方括号)中。

自动配对只是一些专门的键绑定。这应该允许您自动配对回勾。如果要创建其他自动配对符号,它还应作为指南

{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`$0`"}, "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 }
    ]
},
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`${0:$SELECTION}`"}, "context":
    [
        { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
        { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
    ]
},
{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "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": "^`", "match_all": true }
    ]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
    [
        { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
        { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
        { "key": "preceding_text", "operator": "regex_contains", "operand": "`$", "match_all": true },
        { "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true }
    ]
}
只需将该代码块插入到用户密钥绑定中即可

我只是使用了默认的keybinding作为模板,因此您可能需要进一步修改一些上下文以使其完美工作