.TH DED 1 QMC-UMIST .SH NAME ded - display editor .SH SYNOPSIS .B ded [options] filename [options] .PP Arguments may appear in any order. .TP 10 -b select 'auto-break' mode (see LINE BREAKS below). The 'auto-break' mode is set by default except for files with names ending with .c, .h, .m, .m11 .s, .p, .pn, .out, .mk, .make, .Make, makefile or Makefile. It can also be set by the 'b+' command and unset by the 'b-' command. .TP -b- disable 'auto-break' mode. .TP -d replay the '.dlog' file (which .B ded creates during editing) after a UNIX or ded crash. The .dlog file contains all the terminal input since the start of editing or since the last 'w' command. .B ded will find the .dlog file: you merely type, for example, .sp 1 ded foo -d .sp 1 and .B ded will edit the file 'foo' under control of the file 'foo.dlog'. .TP -d- ignore the .dlog file and re-edit the file as if no .dlog file exists. .TP -i select tab preserve mode: tabs in the file are displayed as i, instead of being expanded to spaces. .TP -i- disable tab preserve mode. .TP -l[+/-][.] start editing at line . The line number may be followed by '+', meaning start at the line after , or by '-', meaning start at the line before . A position on the line may be specified by '.'. .TP -m use as the modifier (or escape) character, to make up composite characters such as '{' on a terminal which doesn't have a full ASCII display. For example, .sp 1 ded foo -m% .sp 1 will edit foo, displaying '{' on an ITT terminal, for example, as '%('. The default escape character is @ rather than backslash. .TP -s don't ring the bell when displaying diagnostics, prompts etc.. Useful in an apartment building late at night. .TP -t select 'auto-tab' mode, in which leading spaces on a line are replaced by equivalent combinations of tabs and spaces. The 'auto-tab' mode is set by default on files with names ending with .c, .h, .m, .m11 .s, .p, .pn, .mk, .make, .Make, makefile or Makefile. It can also be set by the 't+' command and unset by the 't-' command. .TP -t- disable 'auto-tab' mode .TP -P. use standard input and output (file descriptors 0 and 1) rather than the terminal (file descriptor 2). Both and must be integer numbers - is width of the screen in characters, is length in lines. Even though the P option is selected, .B ded still uses control character sequences appropriate to the terminal on which it is running. .TP -T set tab stops every columns, instead of the default 8. .TP -$[+/-][.] start editing at last line of file. Optional '+' puts the cursor at the beginning of a blank line after the original last line; optional '-' puts it on line before last line. Optional '.' positions the cursor within the selected line. .PP .SH DESCRIPTION .B ded is an editor for those who like to see their editing context at the time they are typing in or editing or whatever. It maintains a screenful of text, taking some care to make changes by sending the minimum of characters to the terminal. Editing is via control keys and via commands built up on the (special) bottom line of the screen. .PP Printable characters typed in are normally inserted into the text at the point indicated by the cursor, pushing any existing characters to the right. For tabular and pictorial work, however, an overtype mode is available where a typed character replaces the one at the current cursor position. .PP You can move around the picture with the normal cursor-control keys (UP, DOWN, RIGHT, LEFT, wordRIGHT, wordLEFT). The SEND key introduces a 'special' interpretation of the next key depression. RETURN is used to insert newlines into the file. Other cursor-control keys are used as detailed below. .PP .ti -2 .B Cursor control keys .TP 10 .B UP (^K) - move up a single line (and if at top of screen, scroll downwards a bit). .TP .B DOWN (^L) - move down a single line (and if at bottom of screen, scroll upwards a bit). .TP .B LEFT (BACKSPACE or ^H) move left a single character (unless already at left of screen). .TP .B RIGHT (^X) - move right a single character (unless already at right of screen) .TP .B wordLEFT (^B) - move to the beginning of the current 'word' or to the beginning of the first 'word' to the left of the cursor. .TP .B wordRIGHT (^A) - move to the beginning of the first 'word' to the right of the cursor. .TP .B BOL (^S or ^_) - move to the first non-blank character on current line (beginning of line). .TP .B EOL (^E) - move to the word-boundary following the last non-blank character on the current line (end of line). .TP .B TOP (^T) - move to the first line on the screen (top of page). .TP .B BOP (^N) - move to the line before the command line (bottom of page). .TP .B nextPAGE (^P) - move to the next page (screenful) of the file. The cursor stays in the same place on the screen. .TP .B lastPAGE (^Q or ^^) - move to the previous page of the file. The cursor again remains in the same screen position. .TP .B DIAGONAL (^Y) - if in position anywhere in the picture, change to position in the special 'command line' at the bottom of the screen; if in position in the command line, go back to position in the picture. (Note - the characters on the command line are susceptible to insertion, RUBOUT etc. etc., just like any other line of the picture.) .TP .B LINEFEED move to the left of the screen on the next line down (and if at the bottom of screen, scroll upwards a bit). .TP .B RETURN insert a newline in the current line at the current position. (\c .B ded tries hard to use the minimum number of characters to perform the line insertion and tries even harder to make the picture move because of the insertion so that you can tell that it has been performed. Whether the top lines move upwards to make space for the insertion, or the bottom lines move downwards, is therefore hard to predict). .TP .B ESCAPE or ENTER (^[) - wipe the special command line at the bottom of the screen and move the cursor to the start of this line. On terminals which have keypads sending escape sequences, it is usually necessary to press ESCAPE twice or to use a special ENTER key. .TP .B TAB (^I) move to the next tab stop (these are initially set at multiples of 8 columns, but may be changed by the 'tab' command), pushing the tail of the line right if necessary (try it, I can't tell you how ergonomic it is!). .TP .B SEND (^V) - interpret the next key depression specially, viz :- .RS .TP 16 SEND, SEND execute command shown in command line. .TP SEND, UP move to top edge of screen (same as TOP). .TP SEND, DOWN move to bottom edge of screen (same as BOP) .TP SEND, LEFT move to left edge of screen. .TP SEND, RIGHT move to right edge of screen. .TP SEND, wordLEFT move to the beginning of the current line (same as BOL). .TP SEND, wordRIGHT move to the end of the current line (same as EOL). .RE .PP .ti -2 .B Erase/rubout keys .PP .B ded allows erasure of single characters, 'words' and complete lines with a single key depression. When erasing characters or words it is possible to 'erase the line-break' between two lines of text and thus to join two lines together. The effect of inserting a line-break (with RETURN) and then immediately erasing it (with RUBOUT, say) may not, however, leave the line unchanged since a blank character is always inserted between the joined lines when the line-break is erased in this way. .TP 12 .B RUBOUT (or erase <-) - rub out the character to the left of the cursor and pull the tail of the line left one position - but if the cursor is at the left of the screen, join the current line onto the end of the previous line. .TP .B erase -> (^R) - erase the character under the cursor - but if the cursor is to the right of the last non-blank character in the line, join the next line to the current line. .TP .B erase << (^W) - rubout from the cursor position to the first word boundary to its left (see 'Word Boundaries' below) - but if at the left edge of the screen, join to the previous line as for RUBOUT. .TP .B erase >> (^G) - erase from the cursor position to the next word boundary to its right - but if to the right of the last non-blank character in the line, join the next line as for 'erase ->'. .TP .B erase BOL (^U) delete leftwards from the current cursor position to the first non-blank character on the line (or the left edge of the screen if no non-blanks to the left of the cursor) - but if already at the left edge of screen, join to previous line as for RUBOUT. .TP .B erase EOL (^F) delete the line rightwards from the current cursor position - but if to the right of the last non-blank character in the line, join the next line as for 'erase ->'. .TP .B erase line (^] or --M) - delete current line and close up picture: the cursor will always finish up on the NEXT line of the edited file. .PP .ne 7 .ti -2 .B Special Keys .TP 12 .B overtype/insert mode toggle (^O) - this key is used to change from insert to overtype mode or vice-versa. To tell which mode you are in, look at the command line prompt: this is '>' in insert mode and ']' (highlighted if possible) in overtype mode. A message is also printed whenever a mode switch occurs. In overtype mode, the TAB key simply jumps to the next tab stop without inserting any spaces. Erase/rubout keys remove the character, word or line-portion they would normally operate on, but without closing up the line; ie. the object is replaced by spaces. An exception to this is "erase ->" which works the same as in insert mode - if you want to change the character above the cursor to a blank, press SPACE. .TP .B move to next error (^D) - this key is used with the Interactive Compile facility - see the description of the '#' command. It causes the next compiler error message (if any) to be displayed on the command line, and the cursor to be moved to the line or character where the error was discovered. .PP .ti -2 .B Commands .PP Commands to .B ded are typed on the special command line at the bottom of the screen. To enter this line, type ENTER/ESCAPE or DIAGONAL. Commands are executed by typing RETURN, LINEFEED or . Execution by RETURN or LINEFEED is possible only while the cursor is in the command line (though it need not be at the end). The two keys have slightly different effects: .TP 12 .B RETURN execute command and then return to screen (input) mode. The command line is preserved for possible re-use. This is the normal command termination key. .TP .B LINEFEED execute command and then return to command (edit) mode ready for another command. The command line is wiped and cannot be retrieved. .ne 7 This is useful, for example, for giving the sequence to delete a group of lines: .sp .nf {move cursor to first line to be deleted} f a {move cursor to last line to be deleted} l a d a .fi .PP Typing has the same effect as RETURN, but may be used at any time, wherever the cursor is (command or screen mode). This is particularly useful for repeating the command currently displayed on the command line. .PP In the descriptions below, the following conventions are observed: .TP 10 a letter (denoting the lines labelled with that letter via ".", "f" and "l" commands) , '.' (a dot, denoting the line at which the cursor is positioned), '^' (uparrow, denoting the first line of the file), '$' (dollar, denoting the last line of the file) or '*' (asterisk, denoting the whole file). .TP a or a followed by '+' (denoting the position after the last line of that range), or a range followed by '-' (denoting the position before the first line of that range). .PP When .B ded starts to process a command, it puts a white blob on the bottom line, which it removes when the command is completed. This helps when you aren't sure whether you actually hit the , or key or not. If a command is incorrectly typed or can't be executed, .B ded puts a diagnostic message on the bottom line after the command. .PP Most commands are single characters. In cases where the command includes a string argument ('/', ';', 'x', 's' and '!' commands) .B ded remembers the string for use in a future command of the same kind. Thus a '/' character without a following string causes .B ded to display and use the last string typed as an argument to a '/' or ';' command. .PP All commands that involve a search of the file ('/', ';' and 'x' commands) 'wrap-around' the top and bottom of the file. You can be sure, therefore, that if the search fails in the forward direction it will also fail in the reverse direction. .PP A number typed as a command will cause .B ded to move to the line with that number in the file (the first line in the file is always number 1). Note that if you delete or insert lines the line-numbering will change. Line numbers are only provided because of the deplorable diagnostics produced by compilers such as .B cc(I), or .B pc(I), which give line numbers rather than sections of text. .PP .ne 9 1. .I Screen shifting commands .TP .B tof move to top of file (first position of first line) .PD 0 .TP .B ^ move to top of file. .TP .B eof move to end of last line of file .TP .B $ move to last line of file .TP " move to next screenful of text .TP .B & move to previous screenful of text .TP .B % put current line in middle of picture .PD .PP 2. .I Line deletion .TP 12 .B d delete lines in .PP 3. .I Searching .TP .B /[/ ] search for in the file after the current cursor position. The regular expression may be terminated by a '/' character if you wish, but it isn't necessary unless the expression ends with a space character. See below for a description of .B ded regular expressions - .B ded uses a syntax somewhat different to that of the average bear. Note also that .B ded can perform multi-line matches! .TP .B ;[; ] search for in the file before the current cursor position. The regular expression may be terminated with a ';' character, but, once again, it isn't usually necessary. .PP 4. .I String substitution .TP .B x//[/ ] replace the next occurrence of by . .TP .B x;;[; ] replace the previous occurrence of with . .PP In either version of the 'x' command, the may end with a '/' or ';' as appropriate, but once again it isn't usually necessary. The can contain special characters to specify particular replacements : .TP 7 \&'$ (prime, dollar) means insert a newline .PD 0 .TP \&'& (prime, ampersand) means insert a copy of the text matched by .TP \&'( (prime, left bracket, digit - where is in the range 1-9) means insert a copy of the text matched by the 'th bracketed section of the regular expression. .PD .PP An optional may be specified to restrict the search (in this case the final '/' or ';' must be present). After the substitution, .B ded prompts you with 'ok?' on the bottom line. You reply with a single character - 'y' means accept the substitution, 'n' means reject it and restore the status quo ante, '' means accept the substitution and repeat (i.e. look for again), means reject the substitution and repeat. .TP .B s//[/ ] .PD 0 .TP .B s;;[; ] just as the 'x' command, except that the substitution is performed for every occurrence of in the file (or in if specified) without checking any of them with the user. .PD .PP Since .B ded saves the strings typed to substitution commands, simply typing 'x' will repeat the last 's' or 'x' command as an 'x' (ie. interactively). Similarly, Typing 's' repeats the last 's' or 'x' command as an 's' (ie. non-interactively). .PP 5. .I Reading and writing files. .TP .B w write the edited file. Not effective unless the file has changed. .PD 0 .TP .B reallywrite write out the edited file, even though it hasn't changed since the last 'w' command. .PD .TP .B w write the contents of lines to file . .PD 0 .TP .B wd .TP .B dw write the contents of lines to file , then delete them from the edited file. .PD .TP .B a append the contents of lines to file : if the file doesn't exist just create it and write it. .PD 0 .TP .B ad .TP .B da append the contents of lines to file , then delete them from the edited file. .PD .TP .B r insert the contents of file at position . .PP 6. .I Chickening out and buggering off (this phrase copyright M. Python) .TP .B ok rewrite the edited file (see 'w' above) and exit. .PD 0 .TP .B q just exit, don't change the edited file at all - queried if the file has changed in any way since the editing session began or since the last 'w' command. .TP .B reallyquit exit without rewriting the file even though it may have been changed. (no query). .PD .TP .B edit or .PD 0 .TP .B e exit from the current ded session, and instead edit the file named - queried if the current file has changed since the editing session began or since the last 'w' command. .TP .B reallyedit exit from the current session without writing the edited file and instead edit the file named. (no query). .TP .B wedit or .PD 0 .TP .B we write the edited file (see 'w' above), then commence editing the file named. .PD .TP .B restart abandon the current edit and start again on the same file - useful if you have made a hopeless mess of things! Note, however, that if you have written out the file at any time since the start of the editing session, .B restart can only back up to the point where the last 'w' command was issued. .PP 7. .I Option Changing .TP .B b+ change to 'auto-break' mode, with automatic line-breaks inserted when you go past the right margin. .PD 0 .TP .B b- change to 'normal' mode, with no automatic newlines. .TP .B t+ change to 'auto-tab' mode, in which leading spaces on a line in the output file are compressed into tabs where possible. .TP .B t- change to 'normal output' mode, where the output file is a faithful copy of the screen picture. .TP .B tab set tab stops every columns, instead of the normal spacing of 8. .TP .B bell+ make the bell ring whenever something noteworthy happens (this is the default). .TP .B bell- don't ring the bell, ever. .PD .PP 8. .I Executing UNIX commands $SHELL in your environment determines your favourite shell for executing the UNIX command. .TP .B ! execute the UNIX command ''. A '%' character anywhere in the string is replaced by the name of the file being edited. After the command is executed, .B ded waits for you to type a character before it redraws the screen, so that it doesn't obliterate the command's output before you have read it. .TP .B ! execute the last unix command mentionned. .TP .B + write the file (if it has changed) then execute the UNIX command ''. This is equivalent to a 'w' followed by a ! command, and is particularly useful for compiling - for example: +cc % .br writes out the current file and compiles it with the C compiler. .TP .B + repeat the last '+' command mentionned. Note that ded saves the UNIX commands from the last '!' and '+' commands separately, so you can keep, for example "+cc\ %" and "!a.out" saved simultaneously, making it very easy to carry out the typical edit-compile-test sequence. .TP .B - start a .B sh(1) command (i.e. 'shell out' into sh). When you exit from the .B sh command (by typing ^D), .B ded redraws the screen immediately. .TP .PD .PP 9. .I Interactive Compile Facility .PP Some compilers, notably cc(1) and pc(1) may be used interactively from .B ded by using the '#' command instead of '+' above. Rather than printing all the error messages at once (followed by the "ded here..." message - after which they all disappear when you type a character), the first error message is displayed on the ded command line and the screen is redrawn if necessary to display the relevant part of the file, with the cursor placed at the beginning of the line in error, or if possible, under the offending character. To move to the next error, press Control-D. Each further ^D steps through the compiler diagnostics, moving the cursor accordingly. When there are no more error messages, the command line is cleared. .TP .B # write the file (if it has changed) then execute the UNIX command '', assumed to be a compile command such as: #cc % .br A pipe is set up from the output of the compiler to ded, and the error messages read in and decoded according to a standard format. Normally, the diagnostic part of the compiler error message is displayed on the ded command line and the line number (and column number if supplied) are used to move the cursor. If the message does not match the standard format however, or if it does not refer to the file being edited, then it is printed as a whole, and no cursor movement occurs. .TP .B # repeat the last '#' command mentionned. Note that the '#' command shares the same 'save' buffer as '+', so you may type '#' to repeat the last '+' command in interactive mode, or conversely '+' to repeat the last '#' in non-interactive form. .B @ write the file then execute the comand with search for words in output lines in the file text. See below. .B spell invokes: @spell -b file .br and then steps through spelling errors found by .B spell in the file text, allowing corrections to be made. .PP 10. .I Ranges and positions .TP 13 .B . the range consists of the current line. .PD 0 .TP .B f the current line is the first in the range . .TP .B l the current line is the last in the range . .TP .B ' move to the line at . .TP .B = give information about (line numbers and such). .PD .PP 11. .I Text moving .TP .B m move lines in to . .PD 0 .TP .B c put a copy of lines in at . .PD .PP 12. .I Miscellaneous .TP .B p redraw the screen (useful if you hit 'CLEAR' instead of 'U/C LOCK', or if your screen is mangled by some irrelevant broadcast message about system shutdown). .PP .ti -2 .B Regular Expressions .PP The treatment of regular expressions in .B ded is intended to make the obvious easy and the obscure possible. All 'special' characters must therefore be prefixed by a single prime character - e.g. '^ (prime, uparrow) for start-of-line, '$ (prime, dollar) for end-of-line. To protect yourself against accidental error you are only allowed to use the prime character in meaningful ways - i.e. those mentioned in this documentation. .TP 8 1. A regular expression is a sequence of one or more match expressions. .TP 2. A single character is a match expression which matches an occurrence of that character. .TP 3a. '' (prime, prime) is a match expression which matches an occurrence of the prime character. .TP 3b. '/ (prime, slash) is a match expression which matches the slash character. .TP 3c. '; (prime, semicolon) is a match expression which matches a semicolon. .TP 4. '^ (prime, up-arrow) is a match expression which matches the start of a line. .TP 5. '$ (prime, dollar) is a match expression which matches the end of a line. .TP 6. '. (prime, dot) is a match expression which matches any character. .TP 7. ' (prime, space) is a match expression which matches any sequence of spaces and/or newlines. It is useful for finding spaces between words in text files when you only have the formatted and justified output. .TP 8. '['] (prime, left square, sequence of items, prime, right square - where doesn't start with a dash) is a match expression which matches any character which matches any one of the items in the sequence. An item is .RS .TP 5 a character (which matches the character), .PD 0 .TP \&'' (which matches a prime) .TP \&'/ (which matches a slash) .TP \&'; (which matches a semicolon) .TP \&'^ (which matches start of line), .TP \&'$ (which matches end of line) .PD .RE .PP or is a character followed by a dash followed by a character (e.g. a-z), which matches the characters in the range described (e.g. a-z matches any lower case letter). .TP 9. '[-'] is a match expression which matches any character .I except those which match any one of the items. .TP 10. '(') (prime, left bracket, regular expression, prime, right bracket) is a match expression which matches anything that the unbracketed expression would match (it's useful for repetition etc.). .TP 11. '* (match expression, prime, star) matches zero or more occurences of . It matches the .I longest sequence it can find, subject to the rest of the regular expression matching successfully. .TP 12. '** (match expression, prime, star, star) matches zero or more occurences of , but matches the .I shortest sequence it can find, subject to the rest of the expression matching successfully. ('** repetition exists so that multi-line matches can be specified efficiently.) .TP 13. '+ (match expression, prime, plus) matches one or more occurences of . It matches the .I longest such sequence it can find, subject to the rest of the regular expression matching successfully. .TP 14. '++ (match expression, prime, plus, plus) matches one or more occurences of . It matches the .I shortest such sequence it can find, subject to the rest of the regular expression matching successfully (once again, '++ is provided to help with multi-line matches). .TP 15. An expression containing '^ or '$ characters may match a multi-line section of the input - however .B ded will not attempt to find sections which are too long to fit on the screen. .PP .ti -2 .B Line breaks .PP Normally, when a visible character or a space is typed it is placed in the line at the current cursor position, the tail of the line is pushed one position to the right and the cursor moved one position to the right - i.e. the character is inserted into the line at the current cursor position. In 'auto-break' mode a space or visible character typed to the right of the 'bell margin', or an attempt to insert a character in a line which is already full, causes the automatic insertion of a line-break, copying the current line from the start of the last word before the bell margin. In normal mode (i.e. not auto-break) a line is broken only when an attempt is made to insert a character into a line that is already full, and a mark is inserted at the point where the line is broken. .PP This treatment of type-in makes .B ded very nice as a type-in medium for letters, .B roff(I) or .B nroff(I) text, etc. - using RUBOUT is natural as well. .PP .ti -2 .B Modifier characters (silly terminals only) .PP Certain primitive VDUS (the ITT terminals at QMC, for example) don't have a proper ASCII character set, so you are forced to type 'modifier' or 'escape' characters in many cases. On an ITT, for example, you must type , to represent '{'. In all editors, but especially in screen editors like .B ded, this causes much confusion - is the sequence '\\(' one character or two? The Gordian knot is cut by .B ded as follows - 'backslash' on the screen is just a character like any other. When reading the input file it translates each un-displayable character (such as '{') into the correct , sequence, and when rewriting the edited file, it translates , sequences into the appropriate ASCII value. The default modifier character is @, not backslash - this may be a little confusing at first but you soon get used to it and it makes the ubiquitous backslash character easier to handle (easier for you that is - .B ded has no difficulties!). When inserting an modifier character into a file to stand for itself you type it twice - @@ rather than @, say. If you make a mistake and, for example, type @n when you meant @@n, .B ded is kind and tries to understand what you meant. If you want to use 'backslash' as the modifier use the '-m' option when activating .B ded. .PP .ti -2 .B Tab characters in files .PP .B ded assumes that you are editing a .I picture, rather than some sequence of characters. Thus format control characters like don't appear in the picture, and will insert (about) seven spaces - the will .I not be rubbed out as if it was a visible character. You can use the '-t' option or the 't+' command to make .B ded compress leading spaces to tabs in your output lines - no other tab conversion is attempted on output. Use the '-t-' option, or the 't-' command, to remove all tab characters from the output of .B ded. .PP Note that any imbedded tabs in your file will normally be converted to spaces. If it is essential to preserve these for any reason (eg. for editing nroff input, especially UNIX manuals), the '-i' option should be used, though this results in a messy display. If you wish to type in an imbedded tab which will appear as a real tab in the edited file, you must use "^Zi", instead of the TAB key. .PP .ti -2 .B Control characters in files .PP If .B ded finds a control character other than a tab or a newline in the file, it displays it as two characters on the screen. (If the terminal permits it, the mark is a brightened up-arrow, otherwise it is some untypeable character.) The character following the mark is a letter or whatever -C is shown as ^c, for example. RUBOUT is shown as ^?. Null characters are ignored on input. .PP To insert a mark into the text, press ^Z. If you make up invalid combinations (like -<(>, say) .B ded does its best to ignore them. Note also the use of marks to split long lines, explained below. .PP .ti -2 .B Long lines .PP When .B ded reads in the file, it writes it into a buffer, with lines which are too long for the screen split into manageable chunks. A line will be split at the last space before the right edge of the screen - if there isn't a space in the line it will be split at the right hand edge of the screen. When a line is broken, the last character of the line is displayed as a mark (see above) and .B ded will remake the long line on output. Therefore to make .B ded join two lines on output, type a mark (via ^Z) at the end of the first line. .PP .ti -2 .B Left margin .PP .B ded currently uses the two left-hand columns of the screen to indicate ranges set by the '.', 'f' and 'l' commands. It is not envisaged that in any future universe the size of the margin will be under user control. .PP .ti -2 .B Replay (.dlog) file .PP Every character you type is stored (with other useful stuff) in a file whose name ends with '.dlog'. .B ded invents the name of this file, creates it when you start editing and finally deletes it when you have finished editing. If .B ded crashes, or UNIX crashes during an edit, the .dlog file is preserved. As soon as .B ded is fixed, or UNIX is revived, it is possible to replay the characters in the .dlog file by using the '-d' option (see above). So, for example, the command .sp 1 ded fred.c -d .sp 1 will read in all the information held in the file 'fred.c.dlog' and use it to edit the file 'fred.c'. When .B ded exhausts the .dlog file it displays a message and automatically switches to terminal input. .PP There are some difficulties in replaying .dlog files: in particular it is difficult to know when to repeat file-reading, file-writing and unix (shelling-out) commands. In these cases, .B ded asks you whether you wish to replay the command before it goes ahead. Do not attempt to replay a .dlog file on a terminal of different type (i.e. which uses different control-character conventions or has a different screen size) to that used for the original editing session. .PP .ti -2 Environmental Control .PP .B ded may be personalized by placing command line option flags in the environment parameter DEDOPT. These will be read and invoked automatically whenever you use .B ded. .PP The flags in DEDOPT are re-read when an e[dit] or we[dit] command is given: use of these commands is considered to be equivalent to a fresh invocation of .B ded. However, the DEDOPT flags are read before any that you type either in the shell command line invoking .B ded, or to the [w]e[dit] commands, so they may be overridden if necessary by means of explicit flags. .PP The DEDOPT parameter would normally be set up in your ".profile", for example .sp 1 DEDOPT="-T4 -t -b- -s -$" export DEDOPT .sp 1 causes .B ded to start up with a tab size of 4, turns on leading-tab restoration for all filenames, turns off auto line-breaks for all filenames, tells .B ded never to ring the bell and begins all edits with the cursor placed at the end of the file. .SH DIAGNOSTICS When .B ded thinks you have made a mistake, it writes a message on the bottom line and it rings the bell. The messages have to be short (lack of room) but they are in (a sort of) English. Mostly they relate .B ded's opinion of the syntax of your editing commands. .PP .B ded tries to catch as many of its own errors as possible. When it sees a crash coming, it writes a message on the bottom line and exits as gracefully as possible. The .dlog file is preserved in the hope that it will be useful after the .B ded bug has been fixed. .PP .SH BUGS Certain match expressions may cause the matcher to undertake an amazing amount of work, which will take an amazing amount of time (up to numbers of years, and I do not joke).