In all GUI text editors, web browsers and IDE’s you can move a cursor:
- left/right arrows - move by char;
- ctrl+left/right - move by word;
- home/end - move to start/end of line.
Add Shift to any of above combination and everything you jumped through now is selected and you can: Ctrl+C, Ctrl+X,Delete to copy/cut/delete selection.
Also, you can Ctrl+Delete and Ctrl+Backspace to delete a next/previous word.
Also, you can Ctrl+Home/End to jump to start of first line or end of last line.
I want this to work when I type in a command in my Terminal.
Is it possible in Linux? It’s a vanilla experience in Windows+Powershell, thanks to default PSReadlLine extension. It works both in conhost.exe and in Windows Terminal, but doesn’t work in WT + cmd.exe, which makes me think it’s PSReadLine which is responsible for this technological perfection.
“But you can’t copy with Ctrl+C, it’s…” - You can. When something is selected It copies selection to clipboard, otherwise it sends SIGINT.
I’m not bound to any distro or terminal application, but right now I don’t see these incredible text editing techniques working even in Ubuntu+Powershell+PSReadLine, to say nothing about the Bash. I’ve tried installing WezTerm, but it doesn’t have text selection either, at least by default. And I’m inclined to think it has nothing to do with terminal emulators at all, since it works in conhost.exe+Powershell.


I have everything you mentioned (except maybe the selection only stuff, I don’t use it and forget if I set it up at all) set up in my zsh+kitty setup, so it’s definitely possible. If you want I can dig thru my zshrc and kitty config for the relevant parts once I’m at my pc later.
People in here saying it’s a bad idea for things like compatibility with other shells make some good points, but I think they’re missing one important aspect - fuck other shells, what do I care? 95% of my time in the terminal is spent on my own machine and I may as well make it convenient for myself. The odd time I ssh into another box without my keybinds I’ll be a bit less efficient, but that’s a worthwhile trade off imo.
In Gnome Terminal: Ctrl+arrows work, Ctrl+delete work, home/end work, Ctrl+backspace — not, and there is no text selection, of course. So, something is working as expected without config at all, and for what isn’t working, config will not help.
I never set up text selection and have apparently never tried it till now so that one I can’t help with, but with zsh you can enable ctrl+backspace behaviour by putting
bindkey “^H” backward-delete-wordin your ~/.zshrc file. Ctrl+delete isbindkey “\e[3;5~” delete-word, in case you also use that one.