You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Sublime Text 3中重映射EmacsProEssentials包的撤销快捷键?

How to Remap Shortcuts for the EmacsProEssentials Package in Sublime Text 3

I’ve dealt with similar shortcut customization needs before, and Sublime Text’s user-level config is the way to go here—modifying the package’s own files will get overwritten when the package updates, so we’ll use the safe, persistent method:

  1. Open your user key bindings file
    Launch Sublime Text 3, then go to Preferences > Key Bindings from the top menu. This will split your editor into two panels: the left shows default system/package shortcuts, and the right is your personal custom key bindings file (this is the one you’ll edit).

  2. Identify the target command
    First, you need to know exactly which command the broken ctrl+\ shortcut is triggering. You can either:

    • Use the search bar (Ctrl+F) in the left default bindings panel to look for "ctrl+\\" and note the corresponding "command" value (it’s likely something like "undo" or a package-specific command like "emacs_undo").
    • Or, press Tools > Developer > Show Key Bindings from the menu, then press the problematic ctrl+\ shortcut—this will show you the exact command it’s mapped to.
  3. Add your custom binding
    In the right panel (your user key bindings), add the following JSON snippet (make sure it fits properly within the existing [] brackets, and fix any commas if needed):

    // Remap Emacs-style undo to ctrl+/
    {"keys": ["ctrl+/"], "command": "undo"},
    // Optional: Disable the original ctrl+\ shortcut if you don't want it anymore
    {"keys": ["ctrl+\\"], "command": "noop"}
    

    Replace "undo" with the actual command you found in step 2 if it’s a package-specific one. The noop command simply makes the original shortcut do nothing, so it won’t conflict with your new binding.

  4. Save and test
    Save the user key bindings file (Ctrl+S), then close and reopen Sublime Text to ensure the changes take effect. Now pressing ctrl+/ should trigger the undo action just like you expect in Emacs.

内容的提问来源于stack exchange,提问作者Ray Salemi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 07:18:18