Changes between Version 6 and Version 7 of CustomKeyBindings

Show
Ignore:
Timestamp:
12/22/08 04:04:22 (6 years ago)
Author:
judah (IP: 68.226.89.192)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CustomKeyBindings

    v6 v7  
    22 
    33As of version 0.5, the user may specify custom key bindings in their `.haskeline` file.  The two new settings are: 
    4  - {{{bind: <key> <key>}}} (bind the first key to the actions of the second key) 
     4 - {{{bind: <key> <keys>}}} (bind the first key to the actions of the second key) 
    55 - {{{keyseq: <term> <string> <key>}}} (POSIX-only: add a new key sequence) 
    66 
    7 where {{{<term>}}} is a terminal name (optional), {{{<string>}}} is Haskell string syntax, and {{{<key>}}} is either: 
     7where {{{<term>}}} is a terminal name (optional), {{{<string>}}} is Haskell string syntax, {{{<keys>}}} is a space-separated sequence of {{{<key>}}}s, and {{{<key>}}} is either: 
    88 - a single character 
    99 - `f<n>` (a function key) 
     
    6262}}} 
    6363since `$TERM==xterm-color` means I'm using OS X's Terminal.app program, and `$TERM==xterm` means I'm using the X11 `xterm` program. 
     64 
     65=== Sequence macros === 
     66Originally suggested by Trent Buck: 
     67{{{ 
     68bind: { { } left 
     69bind: ( ( ) left 
     70bind: [ [ ] left 
     71bind: } right 
     72bind: ] right 
     73bind: ) right 
     74}}} 
     75These bindings automatically closes each opening brace; for example, pressing {{{'('}}} will first insert {{{"()"}}} and then move the cursor one character to the left.