【发布时间】:2013-01-05 12:06:41
【问题描述】:
我遇到了 backspace 键绑定问题,它不会仅删除 Sublime Text 2 中的单词。为了退格,我必须突出显示要删除的字符并按退格键,或者使用ctrl + z 返回。而且,ctrl + backspace 会删除输入的单词,而不仅仅是一个字符。此外,shift + backspace 没有任何效果,尽管它假设与退格键执行相同的操作。
我启用了sublime_log_commands(True) 以实时显示键绑定,日志显示正确的绑定发生,但它根本没有删除任何字符。
backpace => command: left_delete
shift + backspace => command: left_delete
&
Ctrl + backspace => command: delete_word {"forward": false}(这个我很好)
然后,我安装了FindKeyConflicts 插件,看看是否有任何冲突,但输出似乎很好,IMO。
[shift+backspace]
left_delete Default
.
.
.
[ctrl+shift+backspace]
left_delete Default
run_macro_file Default
.
.
[ctrl+backspace]
delete_word Default
.
.
[backspace]
left_delete Default
run_macro_file Default
[{"operator": "equal", "operand": true, "key": "setting.auto_match_enabled"}, {"operator":
"regex_contains", "operand": "^\"", "match_all": true, "key": "following_text"}, {"operator":
"regex_contains", "operand": "\"$", "match_all": true, "key": "preceding_text"}, {"operator":
"equal", "operand": true, "match_all": true, "key": "selection_empty"}]
run_macro_file Default
[{"operator": "equal", "operand": true, "key": "setting.auto_match_enabled"}, {"operator":
"regex_contains", "operand": "^'", "match_all": true, "key": "following_text"}, {"operator":
"regex_contains", "operand": "'$", "match_all": true, "key": "preceding_text"}, {"operator":
"equal", "operand": true, "match_all": true, "key": "selection_empty"}]
run_macro_file Default
[{"operator": "equal", "operand": true, "key": "setting.auto_match_enabled"}, {"operator":
"regex_contains", "operand": "^\\)", "match_all": true, "key": "following_text"},
{"operator": "regex_contains", "operand": "\\($", "match_all": true, "key": "preceding_text"},
{"operator": "equal", "operand": true, "match_all": true, "key": "selection_empty"}]
run_macro_file Default
[{"operator": "equal", "operand": true, "key": "setting.auto_match_enabled"}, {"operator":
"regex_contains", "operand": "^\\]", "match_all": true, "key": "following_text"}, {"operator":
"regex_contains", "operand": "\\[$", "match_all": true, "key": "preceding_text"}, {"operator":
"equal", "operand": true, "match_all": true, "key": "selection_empty"}]
run_macro_file Default
[{"operator": "equal", "operand": true, "key": "setting.auto_match_enabled"}, {"operator":
"regex_contains", "operand": "^\\}", "match_all": true, "key": "following_text"},
{"operator": "regex_contains", "operand": "\\{$", "match_all": true, "key":
"preceding_text"}, {"operator": "equal", "operand": true, "match_all": true, "key":
"selection_empty"}]
run_macro_file CSS
[{"operator": "equal", "operand": true, "key": "setting.auto_match_enabled"}, {"operator":
"regex_contains", "operand": "^;", "match_all": true, "key": "following_text"}, {"operator":
"regex_contains", "operand": ":$", "match_all": true, "key": "preceding_text"}, {"operator":
"equal", "operand": true, "match_all": true, "key": "selection_empty"}, {"operator":
"equal", "operand": "source.css - meta.selector.css", "match_all": true, "key": "selector"}]
如果有人对如何恢复正常的backspace 操作有任何建议或解决方法,我很乐意听到。
【问题讨论】:
-
关闭所有实例,转到您的
Sublime Text 2文件夹 (docs.sublimetext.info/en/latest/…) 并重命名为Sublime Text 2 - Backup。重新打开崇高,看看退格是否仍然损坏。这可确保您拥有默认绑定并且没有额外的插件。 -
@d_rail ,我上次看到你的评论时没有回复你的评论,但你所说的确实有效,因为有人建议我这样做。我仍然不明白是什么真正导致了问题。坦克虽然
-
您刚刚解决了执行干净“重新安装”的问题?在删除所有内容并重新安装每晚构建之后,我仍然有这个问题困扰着我。你用什么版本?我认为它与cmets有关,因为在第二条评论之后我无法删除左右。