MINED.9
上传用户:jnzhq888
上传日期:2007-01-18
资源大小:51694k
文件大小:6k
- .CD "mined (en *(M2 editor"
- .SX "minedfR [fIfilefR]
- .FL "fR(none)"
- .EX "mined /user/ast/book.3" "Edit an existing file"
- .EX "mined" "Call editor to create a new file"
- .EX "ls (enl | mined" "Use fIminedfR as a pager to inspect listing"
- .PP
- fIMinedfR is a simple screen editor.
- At any instant, a window of 24 lines is visible on the screen.
- The current position in the file is shown by the cursor.
- Ordinary characters typed in are inserted at the cursor.
- Control characters and keys on the numeric keypad (at the right-hand side
- of the keyboard) are used to move the cursor and perform other functions.
- .PP
- Commands exist to move forward and backward a word, and delete words
- either in front of the cursor or behind it.
- A word in this context is a sequence of characters delimited on both ends by
- white space (space, tab, line feed, start of file, or end of file).
- The commands for deleting characters and words also work on line feeds, making
- it possible to join two consecutive lines by deleting the line feed between them.
- .PP
- The editor maintains one save buffer (not displayed).
- Commands are present to move text from the file to the buffer, from the buffer
- to the file, and to write the buffer onto a new file.
- If the edited text cannot be written out due to a full disk, it may still
- be possible to copy the whole text to the save buffer and then write it to a
- different file on a different disk with CTRL-Q.
- It may also be possible to escape from the editor with CTRL-S and remove
- some files.
- .PP
- Some of the commands prompt for arguments (file names, search patterns, etc.).
- All commands that might result in loss of the file being edited prompt to ask
- for confirmation.
- .PP
- A key (command or ordinary character) can be repeated
- .I n
- times by typing
- .I "ESC n key"
- where
- .I ESC
- is the *(OQescape*(CQ key.
- .PP
- Forward and backward searching requires a regular expression as the search
- pattern.
- Regular expressions follow the same rules as in the
- .Ux
- editor,
- .I ed .
- These rules can be stated as:
- .LI
- .IT
- Any displayable character matches itself.
- .IT
- &. (period) matches any character except line feed.
- .IT
- &^ (circumflex) matches the start of the line.
- .IT
- &$ (dollar sign) matches the end of the line.
- .IT
- &\c matches the character fIcfR (including period, circumflex, etc).
- .IT
- [fIstringfR] matches any of the characters in the string.
- .IT
- [^string] matches any of the characters except those in the string.
- .IT
- [fIx(enyfR] matches any characters between fIxfR and fIyfR (e.g., [fIa(enzfR]).
- .IT
- Pattern(** matches any number of occurrences of fIpatternfR.
- .LX
- Some examples of regular expressions are:
- .HS
- .in +1.25i
- .ta +1.0i
- .ti -1.0i
- The boy matches the string *(OQThe boy*(CQ
- .ti -1.0i
- ^$ matches any empty line.
- .ti -1.0i
- ^.$ matches any line containing exactly 1 character
- .ti -1.0i
- ^A.*\.$ matches any line starting with an fIAfR, ending with a period.
- .ti -1.0i
- ^[A(enZ]*$ matches any line containing only capital letters (or empty).
- .ti -1.0i
- [A(enZ0(en9] matches any line containing either a capital letter or a digit.
- .ti -1.0i
- &.*X$ matches any line ending in *(OQX*(CQ
- .ti -1.0i
- A.*B matches any line containing an *(OQA*(CQ and then a *(OQB*(CQ
- .in -1.25i
- .sp
- .PP
- Control characters cannot be entered into a file simply by typing them because
- all of them are editor commands.
- To enter a control character, depress the ALT key, and then while holding it
- down, hit the ESC key.
- Release both ALT and ESC and type the control character.
- Control characters are displayed in reverse video.
- .PP
- The
- .I mined
- commands are as follows.
- .sp
- .in +1.25i
- .ta +1.0i
- .ti -1.25i
- fBCURSOR MOTIONfR
- .ti -1.0i
- fBarrowsfR Move the cursor in the indicated direction
- .ti -1.0i
- fBCTRL-AfR Move cursor to start of current line
- .ti -1.0i
- fBCTRL-ZfR Move cursor to end of current line
- .ti -1.0i
- fBCTRL-^fR Move cursor to top of screen
- .ti -1.0i
- fBCTRL-_fR Move cursor to end of screen
- .ti -1.0i
- fBCTRL-FfR Move cursor forward to start of next word
- .ti -1.0i
- fBCTRL-BfR Move cursor backward to start of previous word
- .ti -1.25i
- fBSCREEN MOTIONfR
- .ti -1.0i
- fBHome keyfR Move to first character of the file
- .ti -1.0i
- fBEnd keyfR Move to last character of the file
- .ti -1.0i
- fBPgUp keyfR Scroll window up 23 lines (closer to start of the file)
- .ti -1.0i
- fBPgDn keyfR Scroll window down 23 lines (closer to end of the file)
- .ti -1.0i
- fBCTRL-UfR Scroll window up 1 line
- .ti -1.0i
- fBCTRL-DfR Scroll window down 1 line
- .ti -1.25i
- fBMODIFYING TEXTfR
- .ti -1.0i
- fBDel keyfR Delete the character under the cursor
- .ti -1.0i
- fBBackspacefR Delete the character to left of the cursor
- .ti -1.0i
- fBCTRL-NfR Delete the next word
- .ti -1.0i
- fBCTRL-PfR Delete the previous word
- .ti -1.0i
- fBCTRL-TfR Delete tail of line (all characters from cursor to end of line)
- .ti -1.0i
- fBCTRL-OfR Open up the line (insert line feed and back up)
- .ti -1.0i
- fBCTRL-GfR Get and insert a file at the cursor position
- .ti -1.25i
- fBBUFFER OPERATIONSfR
- .ti -1.0i
- fBCTRL-@fR Set mark at current position for use with CTRL-C and CTRL-K
- .ti -1.0i
- fBCTRL-CfR Copy the text between the mark and the cursor into the buffer
- .ti -1.0i
- fBCTRL-KfR Delete text between mark and cursor; also copy it to the buffer
- .ti -1.0i
- fBCTRL-YfR Yank contents of the buffer out and insert it at the cursor
- .ti -1.0i
- fBCTRL-QfR Write the contents of the buffer onto a file
- .ti -1.25i
- fBMISCELLANEOUSfR
- .ti -1.0i
- fBnumeric +fR Search forward (prompts for regular expression)
- .ti -1.0i
- fBnumeric (mifR Search backward (prompts for regular expression)
- .ti -1.0i
- fBnumeric 5fR Display the file status
- .ti -1.0i
- fBCTRL-]fR Go to specific line
- .ti -1.0i
- fBCTRL-RfR Global replace fIpatternfR with fIstringfR (from cursor to end)
- .ti -1.0i
- fBCTRL-LfR Line replace fIpatternfR with fIstringfR
- .ti -1.0i
- fBCTRL-WfR Write the edited file back to the disk
- .ti -1.0i
- fBCTRL-XfR Exit the editor
- .ti -1.0i
- fBCTRL-SfR Fork off a shell (use CTRL-D to get back to the editor)
- .ti -1.0i
- fBCTRL-\fR Abort whatever the editor was doing and wait for command
- .ti -1.0i
- fBCTRL-EfR Erase screen and redraw it
- .ti -1.0i
- fBCTRL-VfR Visit (edit) a new file
- .in -1.25i
- .SS "Author"
- .PP
- fIMinedfR was designed by Andy Tanenbaum and written by Michiel Huisjes.