diff --git a/README.md b/README.md index 3a73c89..ff80fa7 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ adapt to various uses. For FreeBSD, macOS, Linux: - make + ./build Binaries will be found in the `bin` directory. The ones of interest are: @@ -44,4 +44,3 @@ working directory to operate. Wrapping a shell script, some RETRO code, and using the `rre` interface, this is a slightly nicer alternative to the basic `repl` for interactive use. - diff --git a/example/edit.forth b/example/edit.forth index a11382b..4fa55fb 100755 --- a/example/edit.forth +++ b/example/edit.forth @@ -238,6 +238,14 @@ One more command: a word to jump to a particular line in the file. gets s:to-number !CurrentLine ; ~~~ +~~~ +:goto-start (-) + #0 !CurrentLine ; + +:goto-end (-) + @LineCount !CurrentLine ; +~~~ + And now tie everything together. There's a key handler and a top level loop. ~~~ @@ -268,6 +276,8 @@ And now tie everything together. There's a key handler and a top level loop. $v [ paste-line ] case $< [ dedent-line ] case $> [ indent-line ] case + $[ [ goto-start ] case + $] [ goto-end ] case $j [ &CurrentLine v:inc constrain ] case $k [ &CurrentLine v:dec constrain ] case $g [ goto constrain ] case