【问题标题】:Sublime Text 2 and Backspace(left_delete) issueSublime Text 2 和 Backspace(left_delete) 问题
【发布时间】: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有关,因为在第二条评论之后我无法删除左右​​。

标签: sublimetext2 key-bindings


【解决方案1】:

既然你说它解决了这个问题,我会添加它作为答案:

关闭所有实例,转到您的 Sublime Text 2 folder 并重命名为 Sublime Text 2 - Backup(对于 linux,sublime-text-2.backup)。这样你就不会丢失任何重要的东西。重新打开崇高。这将使用默认绑定重新添加上述文件夹,并且没有额外的插件。

要查看导致问题的原因:开始一一添加您正在使用的插件,并查看哪些会破坏退格键。这也可能是键绑定冲突的问题。所以添加个人绑定的方式和插件一样。

【讨论】:

  • 在我的情况下,问题是由我使用的 sublime 版本引起的。我被订阅了夜间构建。我改回具有相同配置的稳定版本,问题已解决。
【解决方案2】:

我有同样的问题,看,我搜索了如何解决这个问题,是这样的:

  1. 重新安装 sublime text

  2. 用一个十六进制编辑器软件,我在 Fedora/Ubuntu 上使用 Ghex,运行它并菜单 File->Open,打开 sublime text 可执行文件(安装文件夹),然后,进入菜单:edit->go to字节,并通过 0x590ADC 搜索,将 33 替换为 32,保存然后执行并粘贴许可证,就这样,退格键应该可以工作。 ‎ 使用 Sublime Text 2.0.2(Linux 版)测试

【讨论】:

    【解决方案3】:

    您应该“重置”sublime text 2 的设置。 首先关闭 sublime text 2,然后打开终端并输入:

    mv ~/.config/sublime-text-2/ ~/.config/sublime-text-2.org
    

    然后重新启动 sublime text 2。 :)

    【讨论】:

      【解决方案4】:

      这只是发生在我身上(在 SublimeText3 中),结果我仍然在后台打开了“这是免费副本”警报。关闭它可以解决问题。

      【讨论】:

        【解决方案5】:

        我在安装 Kubuntu 时遇到了这个问题。这很简单: 当你试图破解你的崇高,通过改变十六进制值 33 42 到 32 42 它将在 255 个字符后阻止简单的退格 (left_delete) 和 del (right_backspace)。 (试一试:写 256 个字符,并尝试删除最后一个)。

        解决此问题的方法是选择要删除的所需字符,然后执行 left_delete/right_delete。

        如果您想解决此问题,请按照其他建议进行操作,即重新安装您的 sublime(未注册版本)。

        在 Windows 上未发现此问题。

        【讨论】:

          【解决方案6】:

          轻松转到首选项 -> 键绑定 - 默认 搜索密钥别名并编辑您想要保存的任何内容,然后就可以使用了

          【讨论】:

            【解决方案7】:

            我今天也遇到了同样的问题,查了一下文档,找到了问题的原因和解决方法。

            出现此问题是因为您可能不小心更改了某些设置。所以你必须恢复这些设置。

            现在,转到首选项 -> 设置 -> 用户设置现在检查“ignored_pa​​ckages”:[“Vintage”] 并将其从用户设置中删除。 现在您的快捷键就可以正常工作了。

            【讨论】:

              猜你喜欢
              • 1970-01-01
              • 1970-01-01
              • 1970-01-01
              • 2013-02-17
              • 2012-11-18
              • 1970-01-01
              • 1970-01-01
              • 1970-01-01
              • 2012-07-22
              相关资源
              最近更新 更多