Edit this page

herkforth Command Keys

These are the keys you use to control the editor. Don't miss T and C.

You may notice that a lot of the keys are capital letters. So type your words in lowercase, and your commands uppercase. Careful of the stupid caps lock.

MOVING AROUND

searching
T        move cursor to definition of cursor-word or input line (new in herkforth-0.8)
         (type a word and hit shift-T or put the cursor on a word and press shift-T)
V        find/find-next (find-next added in probably herkforth-0.6) (find new in herkforth-0.7)
K        press another key to go to the word that is executed for that key (new in herkforth-0.8)

crawling
H        move cursor back
N        move cursor forward
{        edit previous block
}        edit next block

misc
E        edit block whose number is on the input line (or under the cursor) (new in herkforth 0.6)
C        move cursor back to where it was last (up to 25 locations are saved)
Y        clear the cursor history, so you can't go back beyond where you are now


EXECUTING

<enter>  execute the word on the input line
B        run the whole current block through the interpreter
M        run the word under the cursor through the interpreter and advance cursor


EDITING

inserting
<space>  insert the text you've just typed after the cursor
[        change to yellow (execute color) *
]        change to green (compile color) *
`        change to cyan (tic color) *
:        define a word (red) *
'        define a constant (magenta) *
&        define a variable (white) *
"        define a persistent data object
U        undelete (paste the last word you deleted. FILO (stack). works nicely for cut and paste)
(        type/edit comment for word under cursor

deleting
\              delete word under cursor (you can paste it back in with U (see above))
<backspace>    delete a character from the end of the input line
control-u      clear the input line (new in herkforth-0.8)


changing
R        rename the word under the cursor to what you've just typed on the input line
See also: color changes above (under inserting)


MISC.
<tab>    complete: try to finish typing the word for you. (new in herkforth-0.8)
$        (not really a command) start hex numbers with $
S        bootstrap and save. This compiles a forth kernel and saves that, the
               dictionary, data, and source to a new elf
Q        quit
ctrl-L   redraw the screen

* Note about switching colors: To enter a word in a different color [than it apears in as you type] type the word, then hit the key for that color. Pressing a color key with nothing on the input line will change the color of the word under the cursor. Warning: changing a word to a different type (eg a red word (normal word) to a magenta (constant)) will likely yield unexpected (and probably unpleasant) results. This may be addressed in future versions.

Note: there is no key for herkforth export source.

If you'd like another source block to play with, just type "new-block" (without quotes) and press ENTER. This will give you a (nearly) empty block after the others.

See Also:

herkforth interface

herkforth docs

herkforth

forth

Edit this page · home ·