Changes between Version 6 and Version 7 of CustomKeyBindings
- Timestamp:
- 12/22/08 04:04:22 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CustomKeyBindings
v6 v7 2 2 3 3 As 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) 5 5 - {{{keyseq: <term> <string> <key>}}} (POSIX-only: add a new key sequence) 6 6 7 where {{{<term>}}} is a terminal name (optional), {{{<string>}}} is Haskell string syntax, and {{{<key>}}} is either:7 where {{{<term>}}} is a terminal name (optional), {{{<string>}}} is Haskell string syntax, {{{<keys>}}} is a space-separated sequence of {{{<key>}}}s, and {{{<key>}}} is either: 8 8 - a single character 9 9 - `f<n>` (a function key) … … 62 62 }}} 63 63 since `$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 === 66 Originally suggested by Trent Buck: 67 {{{ 68 bind: { { } left 69 bind: ( ( ) left 70 bind: [ [ ] left 71 bind: } right 72 bind: ] right 73 bind: ) right 74 }}} 75 These bindings automatically closes each opening brace; for example, pressing {{{'('}}} will first insert {{{"()"}}} and then move the cursor one character to the left.
