Version 1 (modified by judah, 9 years ago)


Key Bindings

Haskeline provides a line-editing user interface with many interactivity commands. Currently the user may choose either Emacs or Vi style bindings by editing the ~/.haskeline file; see System.Console.Haskeline.Prefs for more details.


  • ^A: Control-A
  • M-A: Option-A
  • [printable char]: Any Unicode printable character (Data.Char.isPrint returns True)
  • [kill]: the console's 'kill' character (usually ^U)

Commands shared by both bindings

Left/right arrow move the cursor left/right by one character
Return finish the line entry
Backspacedelete the character left of the cursor
Delete delete the character right of the cursor
[printable char] insert a character
Up/down arrow move backwards/forwards in the command history
Tab run tab completion
^L clear the screen
^R search backwards in history
^S search forwards in history
[kill] delete until the start of the line

Emacs-specific bindings

^A move to the start of the line
^E move to the end of the line
^B move left one character
^F move right one char
^D delete the character to the right of the cursor
^D is treated as an EOF if the input line is empty and the last character pressed was not also ^D.
M-F move forwards one word
M-b move backward one word
M-w delete backwards one "big word"
M-backspace delete backwards one word
M-D delete forwards one word
^K delete until the end of the line