4.1 Using the List Editor Lists (introduced in Commands Overview:
Lists) are the If you have used a line editor before, such as With a line editor, you work with individual lines of text or with groups of lines, rather than seeing all lines at the same time, with your position in the file marked with a cursor. In order to see the contents of the list, you will need to enter a command that causes text to be displayed. Similarly, you need to enter explicit commands to move around in the list and tell the editor which line you are working with. The following is a walk-through of using the list editor to give a room a lounge on a high-tech world a two-paragraph description. The syntax for lsedit is ==================================== > lsedit here = desc < Welcome to the list editor. You can get help by entering '.h' > < '.end' will exit and save the list. '.abort' will abort any changes. > < To save changes to the list, and continue editing, use '.save' > < Insert at line 1 > ==================================== At this point, we can either type in the text directly, or we can copy
text from a text editor on our client computer, and paste it into our
Let's say that we enter the following description for the room, using either method: ==================================== This lounge, one notices immediately, is oddly anacoustic: something -- perhaps the walls covered in a short-nub, grey carpet, perhaps the somewhat unusual layout of shoulder-high, paper-thin partitions between groups of tables, or perhaps the alcoves set into the walls -- something seems to swallow sound here. Footfalls fall muted; conversations coalesce into a low, murmuring susurrus. A seemingly continuous tube of cobalt blue neon adorns the room, running along the walls eight inhces below the ceiling. Its eye-thwarting hue reflects in dabs and streaks from the furniture: the tables, chairs, barstools, and the bar itself... sleek amalgamations of stainless steel, glass, and buffed black leather. Behind the bar, between shelves holding ornate bottles, sits a single bonsai tree, its tortured form hilighted in the beam of a hidden drop light. ==================================== When we enter the text, nothing seems to happen. Did we successfully
enter it? To see the contents of our list, we can type ==================================== > .l This lounge, one notices immediately, is oddly anacoustic: something -- perhaps the walls covered in a short-nub, grey carpet, perhaps the somewhat unusual layout of shoulder-high, paper-thin partitions between groups of tables, or perhaps the alcoves set into the walls -- something seems to swallow sound here. Footfalls fall muted; conversations coalesce into a low, murmuring susurrus. A seemingly continuous tube of cobalt blue neon adorns the room, running along the walls eight inhces below the ceiling. Its eye-thwarting hue reflects in dabs and streaks from the furniture: the tables, chairs, barstools, and the bar itself... sleek amalgamations of stainless steel, glass, and buffed black leather. Behind the bar, between shelves holding ornate bottles, sits a single bonsai tree, its tortured form hilighted in the beam of a hidden drop light. < listed 2 lines starting at line 1 > > .p 1: This lounge, one notices immediately, is oddly anacoustic: something -- perhaps the walls covered in a short-nub, grey carpet, perhaps the somewhat unusual layout of shoulder-high, paper-thin partitions between groups of tables, or perhaps the alcoves set into the walls -- something seems to swallow sound here. Footfalls fall muted; conversations coalesce into a low, murmuring susurrus. 2: A seemingly continuous tube of cobalt blue neon adorns the room, running along the walls eight inhces below the ceiling. Its eye-thwarting hue reflects in dabs and streaks from the furniture: the tables, chairs, barstools, and the bar itself... sleek amalgamations of stainless steel, glass, and buffed black leather. Behind the bar, between shelves holding ornate bottles, sits a single bonsai tree, its tortured form hilighted in the beam of a hidden drop light. < listed 2 lines starting at line 1 > ==================================== Hmmm... This looks more or less ok, but a couple things have happened to our text as it has been processed by the list editor. Our paragraphs are each currently in one long line, and the blank line that separated them has disappeared. Truly blank lines get `swallowed' by your client, and never make it
to the ==================================== > .i 2 < Insert at line 2> > ( ...we type a couple spaces here... ) > .p 1: This lounge, one notices immediately, is oddly anacoustic: something -- perhaps the walls covered in a short-nub, grey carpet, perhaps the somewhat unusual layout of shoulder-high, paper-thin partitions between groups of tables, or perhaps the alcoves set into the walls -- something seems to swallow sound here. Footfalls fall muted; conversations coalesce into a low, murmuring susurrus. 2: 3: A seemingly continuous tube of cobalt blue neon adorns the room, running along the walls eight inhces below the ceiling. Its eye-thwarting hue reflects in dabs and streaks from the furniture: the tables, chairs, barstools, and the bar itself... sleek amalgamations of stainless steel, glass, and buffed black leather. Behind the bar, between shelves holding ornate bottles, sits a single bonsai tree, its tortured form hilighted in the beam of a hidden drop light. < listed 3 lines starting at line 1 > ==================================== We could leave our text in long lines, one per paragraph, but
sometimes clients have trouble with line wrapping. If we leave it like
this, it's possible that a few players will not be able to see all the
text. ==================================== > .format 1 3 = 76 < Formatted 3 lines starting at line 1 (Now curr line) to 76 columns. > > .p 1: This lounge, one notices immediately, is oddly anacoustic: something -- 2: perhaps the walls covered in a short-nub, grey carpet, perhaps the somewhat 3: unusual layout of shoulder-high, paper-thin partitions between groups of 4: tables, or perhaps the alcoves set into the walls -- something seems to 5: swallow sound here. Footfalls fall muted; conversations coalesce into a 6: low, murmuring susurrus. 7: 8: A seemingly continuous tube of cobalt blue neon adorns the room, running 9: along the walls eight inches below the ceiling. Its eye-thwarting hue 10: reflects in dabs and streaks from the furniture: the tables, chairs, 11: barstools, and the bar itself... sleek amalgamations of stainless steel, 12: glass, and buffed black leather. Behind the bar, between shelves holding 13: ornate bottles, sits a single bonsai tree, its tortured form hilighted in 14: the beam of a hidden drop light. < listed 14 lines starting at line 1 > ==================================== So, we successfully inserted a blank line, separating our paragraphs.
But on second thought, this isn't how we want to format it. The blank
line will break things up too much: the first paragraph will seem to `go
with' the name of the room, and the second paragraph will seem to `go
with' the room's contents list. The desc itself won't look like a
unified whole on the screen. So, we decide instead to delete the blank
line (using The syntax for Some examples... This indents the current line by five spaces: ==================================== > .indent 5 < Indenting 1 lines starting at line 2, 2 columns. > ==================================== This indents line 14 by five spaces: ==================================== > .indent 14 = 5 < Indenting 1 lines starting at line 14, 2 columns. > ====================================This indents lines 18 to 20 by five spaces: ==================================== > .indent 18 20 = 5 < Indenting 3 lines starting at line 18, 2 columns. > ==================================== So, back to our main example: in the list editor, working with our `desc' list for a room, we want to delete line 7 (the blank line) and indent the two remaining lines by two spaces. ==================================== > .del 7 < Deleting 1 lines, starting at line 7 (Now current line) > > .indent 1 = 2 < Indented 1 lines starting at line 1, 2 columns > > .indent 7 = 2 < Indented 1 lines starting at line 7, 2 columns > > .l This lounge, one notices immediately, is oddly anacoustic: something -- perhaps the walls covered in a short-nub, grey carpet, perhaps the somewhat unusual layout of shoulder-high, paper-thin partitions between groups of tables, or perhaps the alcoves set into the walls -- something seems to swallow sound here. Footfalls fall muted; conversations coalesce into a low, murmuring susurrus. A seemingly continuous tube of cobalt blue neon adorns the room, running along the walls eight inhces below the ceiling. Its eye-thwarting hue reflects in dabs and streaks from the furniture: the tables, chairs, barstools, and the bar itself... sleek amalgamations of stainless steel, glass, and buffed black leather. Behind the bar, between shelves holding ornate bottles, sits a single bonsai tree, its tortured form hilighted in the beam of a hidden drop light. ==================================== OK, this is looking good. But we need to make one last change. In the
process of working with the list, we notice a typo in line 8 of the
second paragraph: ==================================== > .repl 8 = /inhces/inches < Replaced. Going to line 8 > 8: along the walls eight inches below the ceiling. Its eye-thwarting hue ==================================== Now, finally, an important point, we need to get out of the list
editor. (Forgetting to get out of the list editor, and typing a
bunch of commands into the list you were just working on is a fairly
common mishap.) To do so, type ==================================== > .end < Editor exited. > < list saved. > ==================================== So we're done! Or are we? We do a ==================================== > @desc here = {list:desc} Description set. > l This lounge, one notices immediately, is oddly anacoustic: something -- perhaps the walls covered in a short-nub, grey carpet, perhaps the somewhat unusual layout of shoulder-high, paper-thin partitions between groups of tables, or perhaps the alcoves set into the walls -- something seems to swallow sound here. Footfalls fall muted; conversations coalesce into a low, murmuring susurrus. A seemingly continuous tube of cobalt blue neon adorns the room, running along the walls eight inches below the ceiling. Its eye-thwarting hue reflects in dabs and streaks from the furniture: the tables, chairs, barstools, and the bar itself... sleek amalgamations of stainless steel, glass, and buffed black leather. Behind the bar, between shelves holding ornate bottles, sits a single bonsai tree, its tortured form hilighted in the beam of a hidden drop light. ==================================== Voila! We're done. |