all repos — minline @ 606f14da66f256f48ddb72f242b1af23f68c8d08

A minimalist but highly-customizable line editing library.

Merge branch 'master' of https://github.com/h3rald/nimline
h3rald h3rald@h3rald.com
Sat, 03 Mar 2018 16:26:36 +0100
commit

606f14da66f256f48ddb72f242b1af23f68c8d08

parent

c226197d60eb9ff637c1228e679e7d99fe1b6282

1 files changed, 12 insertions(+), 2 deletions(-)

jump to
M nimline.nimnimline.nim

@@ -335,15 +335,25 @@ KEYMAP["down"] = proc(ed: var LineEditor) =

ed.historyNext() KEYMAP["up"] = proc(ed: var LineEditor) = ed.historyPrevious() +KEYMAP["ctrl+n"] = proc(ed: var LineEditor) = + ed.historyNext() +KEYMAP["ctrl+p"] = proc(ed: var LineEditor) = + ed.historyPrevious() KEYMAP["left"] = proc(ed: var LineEditor) = ed.back() KEYMAP["right"] = proc(ed: var LineEditor) = ed.forward() +KEYMAP["ctrl+b"] = proc(ed: var LineEditor) = + ed.back() +KEYMAP["ctrl+f"] = proc(ed: var LineEditor) = + ed.forward() KEYMAP["ctrl+c"] = proc(ed: var LineEditor) = quit(0) -KEYMAP["ctrl+x"] = proc(ed: var LineEditor) = +KEYMAP["ctrl+d"] = proc(ed: var LineEditor) = + quit(0) +KEYMAP["ctrl+u"] = proc(ed: var LineEditor) = ed.clearLine() -KEYMAP["ctrl+b"] = proc(ed: var LineEditor) = +KEYMAP["ctrl+a"] = proc(ed: var LineEditor) = ed.goToStart() KEYMAP["ctrl+e"] = proc(ed: var LineEditor) = ed.goToEnd()