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?
Asked
Active
Viewed 1,232 times
3
-
1Does adding the line ` - { key: Back, mods: Command, chars: "\x15" }` to your alacritty.yml file achieve your desired outcome? (per https://github.com/alacritty/alacritty/issues/474#issuecomment-338803299) – jared_mamrot Jul 11 '22 at 23:48
-
it does! you wanna post as an answer so I can award you the bounty? – Thomas Franklin Jul 12 '22 at 00:01
-
Sure thing; glad it solved your problem – jared_mamrot Jul 12 '22 at 00:03
1 Answers
7
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

jared_mamrot
- 22,354
- 4
- 21
- 46