The MOO Noteditor is used to edit text contained in properties. So to understand its use, it is best
to remember this: each object can have properties defined on it, these properties are designated by
a "." before the property name; and each object can have verbs defined on it, these verbs are
designated by a ":" before the verb name. For example, objects have a property .description
which can be set with the @describe object as "xxxx" command. But in order to make that
description longer than a single line or string, you need to use the noteditor.
Before actually editing any text, some basic commands need to be mastered. First, entering and
exiting the editor. The editors are actually special rooms and you are teleported there when you
enter the editor.
IN: to enter the noteditor the command is @notedit object.property
example: @notedit me.description will get you into the noteditor ready to edit your description, or @notedit <slide-projector-name>.s1 will get you into the noteditor ready to edit the first slide.
OUT: to exit the noteditor the command is quit (or even just q) Quitting without saving aborts
your editing session and no changes are made.
LOOK and LIST: while in the editor, you can type look or list. Look will give you a listing of
the commands available in that editor. List will list the text, line by line, of the .property that you
are editing.
[chore 1: enter the noteditor, look and list, and exit the noteditor]
ENTERING TEXT: once in the noteditor there are two ways to enter text. Either one can be used.
1) begin each line independently with a double quote "xxxxxxx
2) type enter, hit enter; now you are in the 'enter' mode and do not have to use the quotes
Hitting the enter key will enter that line of text. Note that a line of text can be actually a paragraph
long. The noteditor will take text and store it as a single line or string until you hit the enter key.
SAVE: typing save will save the newly entered text
[chore 2: @create #5 named <whatever>; @describe <whatever> as "xxxxxxxx"; @notedit
<whatever>.description. Now, enter a second line of text ... save.... quit. Check your work by
looking at <whatever>.]
DELETE: the delete command works by line or by range (a range of lines).
example: while in the editor (not enter mode), del 1 would erase line 1; del 4 would erase line 4.
del 1 3 would delete lines 1, 2 and 3 inclusive.
[chore 3: @notedit <whatever>.description; del one of the two lines; save, quit
Check your work by looking at <whatever>.]
INSERT: the insert command will insert a line of text into the property being edited. The insert command inserts the line just above the insertion point, designated by ^^^^^^^^^^. This is a bit tricky; but ins 3 would insert a new line 3 between the current line 2 and the current line 3. It is best to list the current text, check the insertion point, and then use:
ins x, where x represents the line number of the about to be entered text
example: ins 3, enter; "xxxxx, enter would put xxxxx at line 3
ins x will move the insertion point to between the current line x-1 and the current line x. Moving
the insertion point is often useful while in the noteditor.
[chore 4: @notedit <whatever>.description; enter 2 or 3 lines of text; save; quit... then @notedit
<whatever>.description; list, ins 3, new text; save; quit; look to check your work.]
SUBSTITUTE: This command is a bit complicated but well worth the time to master. It is used to substitute one set of characters for another. It is useful to correct misspellings and minor grammar errors. It depends upon locating a unique sequence of characters and replacing them with a second set of characters.
The command is: s/current text/new text/
Example: The current line reads "The antigen is maddde of protein." The command to fix that
would be: s/maddde/made/
Note that this command works on the line above the insertion point and works line by line. Also be sure to include enough characters to make the noteditor know which characters to replace.
Example: the current line reads: "The cat and the dog....." and it should read "The cat and a
dog..." To replace the second the you would have to include at least the d from dog. s/the/a/
would get you this change: A cat and the dog.... because the noteditor uses the first appearance of
the character string. s/the d/a d/ would get the correct correction.
Remember: s/old/new/
[chore 5: make a substitution or two in your current <whatever>.description]