CHAPTER 5 EDITING MESSAGES This chapter describes how to edit messages using the Verbose editor or the Quiet editor. 59 BIX User Manual Introduction 61 The Verbose Editor 61 Help 62 Append 62 Clear 62 Delete 62 Exit 63 List 63 Quit 64 Substitute 64 Write 65 Search 65 Removing Special Characters 65 The Quiet Editor 66 Quiet Editor Syntax 66 Print 66 Search 67 Append 67 Insert 68 Delete 68 Substitute 69 Change 69 Move 70 Global Commands 71 Write 71 Quit 71 Strike line 72 60 BIX User Manual Introduction BIX has two editors that you can use to correct and expand your messages. The Verbose editor is designed for less-experienced users, while the Quiet editor is for users who have experience with Unixtype editors. The default setting for new users is the Verbose editor. To choose the Quiet editor, see Chapter 7, "Environment Options," on page 97. Whenever you write a message, you are operating in a temporary storage area called the scratchpad. The Verbose Editor The Verbose editor is an easy-to-use tool that lets you enter and modify text in your scratchpad. To invoke the Verbose editor, enter the command edit at the main ( : ), add/action:, or send/action: prompt. The Verbose editor will tell you the number of lines in your scratchpad and actions you can take. These include: append Add more text clear Discard the entire text delete Remove a line or lines exit Save the text and leave the editor list Print out the text on screen substitute Change one string for another quit Leave the editor write Save the text and resume editing help Display available commands Only use the first letter of the command, except for exit, which is en- tered as x. For example, append becomes a and quit becomes q. Here's what the Verbose editor command line looks like: Available commands are: (h)elp (a)ppend (d)elete (l)ist (s)ubstitute (w)rite (q)uit e(x)it (c)lear Command-> 61 BIX User Manual Help Help is available by entering h at the Verbose editor command line. Append To attach text to the end of your scratchpad, enter the append mode by typing: a You can now write as much as you'd like. To leave the append mode, type a period ( . ) at the start of a new line and press Return. To place text at the beginning of the scratchpad, enter: a 0 Similarly, to add text after a specific line, enter the a command followed by the line number. For example, to add text after the third line, you would enter: a 3 Clear To discard your scratchpad, leaving it empty, type: c BIX asks you to confirm this action. If you say yes (or y), BIX clears the scratchpad and returns you to the add/action: (in Conferences) or send/action: (in Mail) prompt. From either prompt, type: q to resume normal operations. Delete To erase a line of text, type the command d followed by the line number to be deleted. For example, to erase the seventh line, you would enter: d 7 62 BIX User Manual To remove a group of lines, enter the d command followed by a range of line numbers separated with a comma. For example, to delete lines 3, 4, and 5 all at once, you would enter: d 3,5 If you type d by itself, the Verbose editor will respond with: Enter line number or range to delete i.e. 10,15 Type in the line number or range of lines you wish to delete. If you do not wish to remove anything, enter a carriage return to redisplay the Verbose editor command line. Exit To save your changes and to leave the editor, enter: x List To view your message, enter: l at the Command -> prompt. The Verbose editor responds with a numbered list of the contents. For ex- ample, 1-> I bought my first computer when I 2-> was in high school. It was a kit, 3-> and it tok me three weeks to 4-> put it together. The Verbose editor lets you list a range of lines. To do this, enter the spread of lines to be displayed followed by the l command. For example, to list lines 2 and 3 in a message, you would enter: 2,3l 63 BIX User Manual Quit To return your scratchpad to its original state without saving any of your changes, enter: q BIX will respond: No write changes since change. If you `quit' now, your changes will be lost. Reenter command to confirm. If you have not made any alterations, the editor will not produce this mes- sage. Once you confirm this action, the add/action: or send/action: prompts return. Substitute To correct a typographical error, use the s, substitute, command followed by the line number. For example, s 3 In response to this request, BIX displays the line and prompts you for the change. Enter the old text and the new text separated by forward-leaning slashes ( / ). The old text is first, followed by the new text. For example, to correct the misspelling of the word "took" on the third line of the above example, you would type: s 3 BIX would respond: 3 -> and it tok me three weeks to Enter the substitution in the form: /old text/new text/ substitution-> 64 BIX User Manual To which you'd type in: /tok/took/ Write To save what you have done thus far without exiting the edit mode, use the w command. BIX tells you how many lines are in your scratchpad and redisplays the command line. Search To find a word, enclose it between forward-leaning slashes ( / ) and BIX will find and display the line with the word in it. To repeat the search, enter two slashes ( // ) from the command line. Removing Special Characters To remove a slash or period from your text, place the forward-leaning slash between a pair of backward-leaning slashes. For example, say that you have written this sentence: -> I think that he/she should get the data To use the word "or" rather than the slash in the phrase "he/she," you would use the substitute command, s, to tell BIX that you want to make a change on that line. Then, you would enter: /he\/\she/he or she/ 65 BIX User Manual The Quiet Editor The Quiet editor is an adaptation of the Unix editor ed. It has fewer prompts than the Verbose editor, and line numbers do not appear on screen. Here's what the Quiet editor command line looks like: E: To get help in the Quiet editor, type help at the E: prompt. Outside of the Quiet editor, type: help quiet. Quiet Editor Syntax Quiet editor commands take the form: line number, command Line numbers may include the following specifiers: $ Last line of text 0 Top of the text . Current line (line most recently acted upon) $-2 Second line from the end .+3 Third line from the current line - Previous line + Next line The Quiet editor always acts on the last line acted upon unless you specify another. Print To list the contents of your scratchpad on the screen, type the number of the line that you wish to see, followed by p. For example, 5p will display the fifth line. To find out the number of the line where you last worked, enter an equal sign ( = ). To see a spread of lines, type the starting and ending line separated by a comma and followed by p. For example, 66 BIX User Manual 1,5p will print out or list lines one, two, three, four, and five. To see your entire scratchpad, enter: 1,$p Search To search for a specific word or line, enclose the word in forward-leaning slashes. For example, /modem/ will print the first line in which the word "modem" appears. Since the Quiet editor remembers the last search string you used, you can repeat a search. To do this, enter a pair of slashes: // Append To add text to your scratchpad, type the line number to which you want to append text, followed by the letter a. For example, to add text after the fourth line, you would enter: 4a To place text at the end of your message, enter: $a To place text at the beginning of your scratchpad, enter: 0a To exit the append mode, place a period ( . ) at the beginning of a line and hit Return. 67 BIX User Manual You must specify a line number to which you want to append text or odd results might occur. If, for example, you have just been working on line three and you type a, the Quiet editor will append the text after line three. If you don't know the line number, you can append text using the search feature. For example, /keyboard/a will append text after the first line in which the word "keyboard" appears. Insert The insert command works like append, except that the inserted text appears before the line you specify. For example, 7i will insert text before the seventh line. Type a -period at the beginning of a new line and hit Return to leave the insert mode. You can use the search feature to insert text before a line containing a specific word. For example, /winchester/i will let you insert text beginning at the line before the word "winchester" appears. Delete To delete a line of text, type the line number followed by the letter d. For example, 4d will delete line number four. To delete a group of lines, type the starting line number and the ending line number separated by a comma and followed by the command d. For exam- ple, to erase lines four, five, and six, you would enter: 68 BIX User Manual 4,6d You can use the search function to delete a line. For example: /access/d will find and delete the first line in which the word "access" appears. Substitute To substitute a word in the text, type the line number followed by s, then the old word and the new word, both in slashes. For example, 15s/copmuter/computer/ will substitute the word "computer" for the misspelling on line 15. If you do not type a line number, the Quiet editor will look for the old word in the last line that you used. If you do not know the line number, you can use the search function to find and correct the mistake. For ex- ample, /copmuter/s/copmuter/computer/ or /copmuter/s//computer/ will locate the line with the misspelling and substitute the correct spell- ing in its place. Change To recast an entire line of text, type the line number followed by c. For example, typing: 6c will let you replace line six with whatever you type next. To redo a group of lines, type in the starting and 69 BIX User Manual ending line numbers separated by a comma and followed by a c. For example, 6,7c will let you replace lines six and seven. To leave the change mode, type a period at the beginning of a line and hit Return. The search command can be used to specify the line that you want to change. For example, /software/c will let you replace the first line in which the word "software" appears. To throw out everything that is in your scratchpad and start again, en- ter: 1,$c Type a period on a line by itself to leave the change mode. Move To relocate a line of text, type the line number followed by the letter m and the destination line number. For example, 4m5 will move line four after line five. To move a range of lines, enter the starting and ending lines separated by a comma, the command m, and the destination. For example, to move lines three, four, and five after line eight, you would enter: 3,5m8 The search feature can be used to move a line. For example, 70 BIX User Manual /module/m3 will place the first line in which the word "module" appears after the third line. Global Commands The search command allows for the global substitution of one word for an- other. To do this, precede the search string with the letter g. For example, suppose you misspelled Ms. Smythe's name as Smith throughout a mail message. To correct this throughout your text, you would enter: g/Smith/s/Smith/Smythe/ The Quiet editor would find every line with the word "Smith" and substitute "Smythe" for the first instance of "Smith" on each line. If there are more than one occurrence of the word to be replaced on a line, repeat the global command. Write To save your text, type: w The Quiet editor will respond by telling you how many lines are in your scratchpad. As with all text editors, it is a good idea to save your work occasionally to prevent losing it. Quit To leave the Quiet editor, type: q If you have not saved any changes you have made to the text (by typing w), the editor will respond with: 71 BIX User Manual No write since last change? If you don't want to save the changes you have made, reenter q and BIX will take you out of the Quiet editor. If you want to save the changes, type w, then q. Strike Line In the append and write modes, you can withdraw a line by entering Control-U. You know that Control-U has done its job by the  symbol. This symbol will not appear in your message, nor will the line, even though both remain on screen. NOTES: 72 BIX User Manual