Search Top Index
HELP INOROUT A. Sloman May 1983 Local Birmingham Version A.Sloman Oct 1992 The following ENTER commands are provided for transcribing (copying) or moving a marked range or a single line or a specified number of lines into the current file, or out from it, possibly to or from a named file. CONTENTS - (Use <ENTER> g to access required sections) -- Introduction: the naming scheme -- Transcribing (or copying) lines in our out -- Transcribing marked range in -- ENTER ti -- ENTER ti <file> -- Transcribing marked range out -- ENTER to -- ENTER to <file> -- Transcribing one or more lines in -- ENTER tli -- ENTER tli <integer> -- Transcribing one or more lines out -- ENTER tlo -- ENTER tlo <integer> -- Transcribing Last Lines In from other file -- ENTER tlli -- ENTER tlli <integer> -- Moving text in or out -- Moving marked range in -- ENTER mi -- ENTER mi <file> -- Moving marked range out -- ENTER mo -- ENTER mo <file> -- Moving one or more lines in -- ENTER mli -- ENTER mli <integer> -- Moving one or more lines out -- ENTER mlo -- ENTER mlo <integer> -- NOTES -- SEE ALSO -- Introduction: the naming scheme ------------------------------------ The names of the procedures use the letter "t" or "m", "i" or "o", and may include an "l" or not, giving the following combinations: ved_ti,ved_to,ved_tli,ved_tlo, ved_mi,ved_mo,ved_mli,ved_mlo. "t" stands for "transcribe" (or copy), "m" for "move". "i" stands for "in" (i.e. transcribe or move text into the current file) "o" stands for "out" (i.e. transcribe or move text out from the current file). The presence of "l" indicates that what is moved or transcribed is only the current line, or some specified number of lines. Where there is no "l" it is the marked range that is transcribed or moved. Where text is moved, it is deleted from the original file. In the cases where there is no "l" an optional additional file name can be specified, into which the text should be moved or transcribed, or from which it should be moved or transcribed. If no file name is given then the previously edited file in the VED buffer list is used, i.e. the one to which ESC x, or vedswapfiles() will switch. In the case where there is an "l" and optional positive or negative number of lines to be copied or moved can be given as argument. The argument defaults to 1. Where the number is negative it refers to that number of lines PRECEDING the current line. When it is positive it refers to that number of lines starting from the current line. The command ved_tlli is used for "transcribing the last lines in", some lines preceding the current line, and is actually almost the same as ved_tli with a negative number of lines specified, the default being -1. The difference is that it also marks the new text. The commands are now defined separately. -- Transcribing (or copying) lines in our out ------------------------- -- Transcribing marked range in -- ENTER ti -- ENTER ti <file> These two commands cause the marked range from the other file to be transcribed into the current file, and inserted immediately after the current line in the current file. If <file> is specified it will be read into a VED buffer if it is not already there, but an error will occur because it has no marked range. If <file> is not specified, then the second file in vedbufferlist will be used, i.e. the one last edited. -- Transcribing marked range out -- ENTER to -- ENTER to <file> These two commands cause the marked range from the current file to be transcribed into the "other" file, and inserted immediately after the current line in the other file. If <file> is specified it will be read into a VED buffer if it is not already there, and the text copied into it. If <file> is not specified, then the second file in vedbufferlist will be used, i.e. the one last edited. -- Transcribing one or more lines in -- ENTER tli -- ENTER tli <integer> If no <integer> is specified this causes the current line to copied In from the second file in vedbufferlist, i.e. copied from the last file edited into the current file, and inserted after the current line in the current file. The cursor will move down a line in both files, so that repeating the command will copy the next line in. Giving a positive <integer> is equivalent to repeating the command that number of times. <integer> defaults to 1 if not provided. So these two are equivalent: ENTER tli ENTER tli 1 Giving a negative <integer> will cause that number of lines preceding the current line in the other file, to be copied in. E.g. ENTER tli -3 will copy in the PREVIOUS three lines from the other file. If there are not enough preceding lines an error occurs. -- Transcribing one or more lines out -- ENTER tlo -- ENTER tlo <integer> If no <integer> is specified this causes the current line to copied from the current file Out to the second file in vedbufferlist, i.e. to the last one edited. The cursor will move down a line in both files, so that repeating the command will copy the next line out. Giving a positive <integer> is equivalent to repeating the command that number of times. <integer> defaults to 1 if not provided. Giving a negative <integer> will cause that number of lines preceding the current line to be copied into the other file. E.g. ENTER tlo -3 will copy out the PREVIOUS three lines to the other file. If there are not enough preceding lines an error occurs. -- Transcribing Last Lines In from other file -- ENTER tlli -- ENTER tlli <integer> These two commands (Transcribe Last Lines In) are almost exactly the same as ENTER tli -1 ENTER tli -<integer> except that the tlli versions also MARK the newly inserted text. This is particularly convenient for producing online documentation files. E.g. If you mark and obey the following command it will produce three lines of output in the output.p file: vars x; for x from 1 to 3 do x => endfor; The sample output can then be copied back in by giving the command ENTER tlli 3 Because it is already marked, the new text can be moved right four spaces by means of the "Block Right" (br) command: ENTER br 4 So ENTER tlli 3 is the same as ENTER tli -3 Plus marking the inserted text. -- Moving text in or out --------------------------------------------- -- Moving marked range in -- ENTER mi -- ENTER mi <file> These two commands are exactly like ENTER ti, and ENTER ti <file>, except that in addition to transcribing the marked range in, they delete it from the other file. So move = transcribe and delete. -- Moving marked range out -- ENTER mo -- ENTER mo <file> These two commands are exactly like ENTER to, and ENTER to <file>, except that in addition to transcribing the marked range out, they delete it from the current file. So move = transcribe and delete. -- Moving one or more lines in -- ENTER mli -- ENTER mli <integer> These two are exactly like ENTER tli, and ENTER tli <integer> except that the transcribed lines are also deleted from the other file. -- Moving one or more lines out -- ENTER mlo -- ENTER mlo <integer> These two are exactly like ENTER tlo, and ENTER tlo <integer>, except that the transcribed lines are also deleted from the current file. -- NOTES -------------------------------------------------------------- If the specified <file> doesn't exist it will be created In all cases if there is no <file> argument, then the command will Move or Transcribe In from or Out to the next file on vedbufferlist, i.e. the last file edited. In all cases new text is inserted immediately after the line where the cursor was last in the file, i.e. immediately after the current line in the recipient file. The newly inserted text will not be 'marked', unless it is already in a marked range. -- SEE ALSO ----------------------------------------------------------- See REF * VEDCOMMS for ENTER t (ved_t), ENTER y (ved_y), ENTER copy (ved_copy) ENTER d (ved_d). See TEACH * MARK for information on marking ranges. --- $poplocal/local/help/inorout --- Copyright University of Birmingham 1992. All rights reserved. ------