mate-desktop / mate-terminal

The MATE Terminal Emulator
http://www.mate-desktop.org
GNU General Public License v3.0
133 stars 73 forks source link

"Edit -> Keyboard Shortcuts...": List `Ctrl+Delete`, and `Alt+Backspace`/`Alt+Ctrl+h` #460

Closed davidhedlund closed 1 month ago

davidhedlund commented 1 month ago

Implement a new text editing shortcut in mate-terminal where Shift+Delete deletes all text from the cursor position to the previous whitespace (moving left).

I cannot find them:

image

cwendling commented 1 month ago

Use Bash's bind for backward-kill-word, or whatever similar feature your shell has. By default you can use Alt+Backspace or Alt+Ctrl+h.

Again, I don't think it should be much specific to the terminal app in use, it's the shell editing the command, and it's already fancy.

davidhedlund commented 1 month ago

By default you can use Alt+Backspace or Alt+Ctrl+h.

Thank you very much.

davidhedlund commented 1 month ago

@cwendling I changed the title and updated the top post.

cwendling commented 1 month ago

@davidhedlund I still don't think this is a MATE-Terminal issue. We don't display and allow changing all Bash bindgins (just think of Ctrl+A, Ctrl+E, Alt+D, etc.), it's a property of the shell, not the terminal app.

Sure, it could send the shell commands to set up bindings, but that would need to know the shell's details (not all shells behave the same in this regards), and I ultimately don't think the terminal app should deal with this. Again, IMO you should configure your shell the way you like using the shell's facilities for this.

davidhedlund commented 1 month ago

delete-char

Ctrl+DEL

~$ bind -P | grep ^"delete-char "
delete-char can be found on "\C-d", "\e[3~".

backward-kill-word

Alt+Ctrl+h

bind -P | grep ^"backward-kill-word "
backward-kill-word can be found on "\e\C-h", "\e\C-?".

Alt+Backspace is not listed, but I will report it to the bind developers.