[index] [home]

Tweet

Readline(3) default key-bindings

Note: I omitted keybindings that collide with either my WM or shell xon/xoff

Note 2: I seem to be too stupid to enter vi-mode; perhaps/likely it's nice.

Searching

    C-r   : start incremental search backwards
    C-g   : abort incremental search; restore original line
    <Esc> :   "       "         "   ; line becomes last search-result

Editing

Moving

    C-a : go to beginning of line
    C-e : "  "  end       "   "
    C-f : go forward one char
    C-b : "    back   "   "
    M-f : "  forward  "  word

Manipulating history

    C-p   : fetch previous command from history
    C-n   :   "     next      "     "      "
    M-C-y : yank first/Nth argument from prev command (repeat for prev command in history)
    M-.   :  "   last     "      "    "      "       "     "   "      "    "     "

Changing text

    C-v : quoted-insert (insert next typed char verbatim)
    M-u : change current word to upper case
    M-l :   "      "      "   "  lower  "
    M-c : capitalise current word

Killing & yanking

    C-k    : kill until end of line
    C-u    : kill backwards until start of line
    M-d    : kill until end of word
    C-w    : kill backwards until start of word
    C-y    : yank whatever was last deleted (when repeated, yank again / append)
    M-y    : yank whatever was last deleted, and pop kill-ring (when repeated, replace previous yank)

Macros

    C-x ( : start recording macro
    C-x ) :  end      "       "  
    C-x e : call last recorded macro

Misc

    M-0..9       : add digit to argument accumulating
    C-x C-u      : undo, from a per-line buffer
    M-<space>    : set mark
    C-x C-x      : jump to mark
    C-] <char>   : find forward to next <char>
    M-C-] <char> :  "   backward "  "     "


Delivered to you by Vim, GNU Make, MultiMarkdown, bozohttpd, NetBSD, and 1 human.