带有CMD+ Backpace

发布于 2025-02-13 13:38:14 字数 124 浏览 0 评论 0原文

由于各种原因,最近从Iterm转换为Alacritty。我现在意识到我经常使用的一件事是Command + Backspace删除和整个行(是的,我知道CTR + U,但这不是我的肌肉记忆)。有没有办法为清除线条清晰的捷径设置捷径吗?

Recently switched from Iterm to Alacritty for various reasons. One thing that I'm now realizing I used a lot is command + backspace to delete and entire line (Yes I'm aware of CTR + U, but that's not muscle memory for me). Is there a way to set up a shortcut for line clear in alacrity?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

她比我温柔 2025-02-20 13:38:14

添加行- {key:back,mods:命令,字符:“ \ x15”}到alacritty.yml文件将在macOS上使用“ cmd+backspace”删除整个行。

另外,这里还有一些我对Alacritty设置所做的其他关键更改,这可能会使您的生活更轻松(per https://github.com/alacritty/alacritty/issues/474#issuecomment-338803299 ):

  - { key: Left,     mods: Alt,     chars: "\x1bb"                       } # Skip word left
  - { key: Right,    mods: Alt,     chars: "\x1bf"                       } # Skip word right
  - { key: Left,     mods: Command, chars: "\x1bOH",   mode: AppCursor   } # Home
  - { key: Right,    mods: Command, chars: "\x1bOF",   mode: AppCursor   } # End
  - { key: Back,     mods: Command, chars: "\x15"                        } # Delete line
  - { key: Back,     mods: Alt,     chars: "\x1b\x7f"                    } # Delete word

Adding the line - { key: Back, mods: Command, chars: "\x15" } to the alacritty.yml file will delete the entire line with "Cmd+Backspace" on macOS.

Also, here are some additional keybinding changes I've made to my alacritty setup that may make your life easier (per https://github.com/alacritty/alacritty/issues/474#issuecomment-338803299):

  - { key: Left,     mods: Alt,     chars: "\x1bb"                       } # Skip word left
  - { key: Right,    mods: Alt,     chars: "\x1bf"                       } # Skip word right
  - { key: Left,     mods: Command, chars: "\x1bOH",   mode: AppCursor   } # Home
  - { key: Right,    mods: Command, chars: "\x1bOF",   mode: AppCursor   } # End
  - { key: Back,     mods: Command, chars: "\x15"                        } # Delete line
  - { key: Back,     mods: Alt,     chars: "\x1b\x7f"                    } # Delete word
也只是曾经 2025-02-20 13:38:14

使用新的TOML配置文件格式,您可以使用以下内容:

[[keyboard.bindings]]
key = "Back"
mods = "Command"
chars = "\u0015"

With the new TOML config file format, you can use the following instead:

[[keyboard.bindings]]
key = "Back"
mods = "Command"
chars = "\u0015"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文