Alt-delete
deletes the whole word before cursorAlt-d
deletes the whole word after cursorCtrl-k
deletes (kill) everything after the cursor
Whatever is deleted is stored in the "killring" and can be pasted(yanked) back with Ctrl-y
(like someone else already mentioned), consecutive uses of Alt-delete
/Alt-d
add to the killring.
Alt-b
/Alt-f
moves one word backwards / forwardsAlt-t
swaps (translocates) the current word with the previous oneCtrl-_
undo last edit operation
All those bindings are the same as in emacs.
Also, normally Ctrl-d
inserts the end-of-file character, and typically can be used to close an active shell session or when you have some other interpreter open in the terminal for interactive input.
That's horrible for muscle memory, every time I switch desk/keyboard I have to re-learn the position of the home/end/delete/PgUp/PgDn keys.
I got used to
Ctrl-a
/Ctrl-e
and it became second nature, my hands don't have to fish for extra keys, to the point that it becomes annoying when a program does not support that. Some mapCtrl-a
to "Select all" so, for input fields where the selection is one line, I'd ratherCtrl-a
thenleft
/right
to go to the beginning/end than fish forhome
/end
, wherever they are.