【发布时间】:2020-01-29 12:59:31
【问题描述】:
问题是你必须使用箭头或宏来跳出括号、方括号、花括号、单引号和双引号。
【问题讨论】:
-
您可能希望从问题中取出答案并将它们分开
-
我这样做了,但 Vijay 建议附加它们。我再把他们分开????
标签: sublimetext vscode-settings brackets
问题是你必须使用箭头或宏来跳出括号、方括号、花括号、单引号和双引号。
【问题讨论】:
标签: sublimetext vscode-settings brackets
我找到的简单解决方案:
[VSCode]有一个名为TabOut的扩展,安装它(完成)。
[SublimeText3] 我们必须对 Key Bindings 进行一些更改 首选项>键绑定 将下面的 sn-p 复制并粘贴到右侧窗格中,保存并关闭此窗口。 (经过测试和工作✌)
[
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": "($1)$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": "{$1}$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": "[$1]$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": "\"$1\"$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 },
{ "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 }
]
},
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'$1'$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 },
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "['a-zA-Z0-9_]$", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true }
]
},
]
【讨论】: