Sunday, April 17, 2005

Emacs sample commands (useful for default BASH shell and mysql console)

alt-f move forwards one word.
alt-b move backwards one word.
ctrl-e go to end of line.
ctrl-a go to beginning of line.

ctrl-k delete to end of line or delete blank line.
ctrl-_ undo last change

ESC-d delete word to the right


Readline vi Mode
While the Readline library does not have a full set of vi editing functions, it does contain enough to allow simple editing of the line. The Readline vi mode behaves as specified in the POSIX 1003.2 standard.

In order to switch interactively between emacs and vi editing modes, use the `set -o emacs' and `set -o vi' commands (see section 4.3 The Set Builtin). The Readline default is emacs mode.

No comments: