readline is used by many interactive programs (bash, python, bc, gnuplot, ...), and so these timesaving keybindings are very useful to know, especially when working over remote high latency links where moving character by character can be problematic. readline is configured using ~/.inputrc You can create your own shortcuts by adding entries like the following: "\e[21~": "mc\C-M" #F10 toggles mc on and off In bash `bind -p` will give a list of bindings. readline defaults to emacs bindings but you can change it to vi mode. `info readline` for more info.
Key | Action | Notes |
Ctrl+v | insert next char literally rather than interpretting | |
Ctrl+r | search (back) through history (incrementally) for typed chars | |
Ctrl+{left,right} | move to start,end of (previous,next) word | |
Ctrl+k | del to end of line | |
Ctrl+u | del to start of line | This is on all terminals |
Ctrl+w | del word (to left) | This is on all terminals |
Alt+r | undo edits | |
Alt+. | paste last word from previous line | Also referenced with !$ in bash. See also magic-space in ~/.inputrc |
© May 17 2006