Bash Shortcuts are based on Emacs

Some time ago I learned that you can change Bash to vim-like behaviour.

set -o vi

Default usually is emacs-like. This means, emacs shortcuts work in Bash.

Command Action Alternative
Ctrl+f/b One character forward/backward ←/→
Alt+f/b One word forward/backward Ctrl+ ←/→
Ctrl+n/p One command forward/backward ↑/↓
Ctrl+a/e Jump to start/end of line Pos1 / Ende
Entf Remove character at the cursor position (from the right)
Backspace Remove character before the cursor position (from the left)
Alt+Backspace Remove word before the cursor position
Ctrl+d Remove the characters at and after the cursor position
Alt+d Delete the word under and from the cursor position
Ctrl+u Delete everything before the cursor -
Ctrl+k Delete everything from the curser to the end of line
Ctrl+y Insert the just copied/removed text (even multiple times) -
Alt+u/l Change word under curser to uppercase/lowercase starting at cursor position. -
Alt+</> Jump to the start/end of history ? Alt+Pos1/Ende
Ctrl+l Bring the current prompt line to the upper edge -
Alt+x+u Undo changes Alt+/

Discussion

Enter your comment: