Text editing
NakedMud has a built-in text editor that can be used for editing long pieces
of text -- such as room or object descriptions. Any time a large text field is
edited, the built-in text editor will pop up. As a point, every player has
access to a notepad, where they can write. This is intended to support the
future implemention of, for instance, a mail and postoffice system. Text editing
can be demonstrated with the notepad. Your notepad can be opened with the
write command.
> write ========================================================================== Begin editing. /q on a new line to quit, /a to abort. /h for help ========================================================================== ]NakedMud's text editor is a line editor. That is to say, you can only edit line by line, and not character by character, like would be possible with a modern word processor. It is simple, but it is sufficient for most mud building. Once within a text editor, you can simply start writing. Here is an example:
========================================================================== Begin editing. /q on a new line to quit, /a to abort. /h for help ========================================================================== ] The nice cobblestones of Mainstreet are not as well kept, here. ] A bit further to the west and south, they fade ] completely to dirt roads. This is definitely not a well upkept area of town. ] The city gates can be seen further to the west, along with the city walls. ]Notice the uneven spacing of the text. The text editor has a formatting command to nicely align awkwardly spaced text. You can use /f to format a body of text, and /l to list the result.
] /f Buffer formatted. ] /l The nice cobblestones of Mainstreet are not as well kept, here. A bit further to the west and south, they fade completely to dirt roads. This is definitely not a well upkept area of town. The city gates can be seen further to the west, along with the city walls. ]The text editor supports a range of functions, including string replacement, line editing, deleting, and inserting, and buffer clearing. To obtain a list of all functions the editor has, the /h command can be used.
] /h /i # txt Insert new text at the specified line number /d # Delete line with the specified number /e # txt Sets the text at the specified line to the new text /f Formats your text into a paragraph /a Quit editor and don't save /ra 'a' 'b' repalce all occurences of 'a' with 'b' /q Quit editor and save changes /l List the current buffer contents /c Clear the contents of the buffer /r 'a' 'b' replace first occurence of 'a' with 'b' /h Display editor commands ]Suppose you are dissatisfied with a description you have entered. For instance, you do not want the cobblestones to be nice but, instead worn. You can search for and replace one or all occurence of a word with the /r and /ra commands, respectively. Each command takes two arguments that must each be contained within a ' and a '. The first argument is a word to replace, and the second argument is a word to replace it with. So, let's say we want to replace all occurences of the word, nice:
] /ra 'nice' 'worn' 1 occurence of 'nice' replaced with 'worn'. ] /l The worn cobblestones of Mainstreet are not as well kept, here. A bit further to the west and south, they fade completely to dirt roads. This is definitely not a well upkept area of town. The city gates can be seen further to the west, along with the city walls. Buildings line the street to the north up to the city wall, except for a narrow alley you spot right at the edge of the ]