source: trunk/minix/man/man9/mined.9@ 11

Last change on this file since 11 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 6.2 KB
Line 
1.so mnx.mac
2.TH MINED 9
3.CD "mined \(en \*(M2 editor"
4.SX "mined\fR [\fIfile\fR]
5.FL "\fR(none)"
6.EX "mined /user/ast/book.3" "Edit an existing file"
7.EX "mined" "Call editor to create a new file"
8.EX "ls \(enl | mined" "Use \fImined\fR as a pager to inspect listing"
9.PP
10\fIMined\fR is a simple screen editor.
11At any instant, a window of 24 lines is visible on the screen.
12The current position in the file is shown by the cursor.
13Ordinary characters typed in are inserted at the cursor.
14Control characters and keys on the numeric keypad (at the right-hand side
15of the keyboard) are used to move the cursor and perform other functions.
16.PP
17Commands exist to move forward and backward a word, and delete words
18either in front of the cursor or behind it.
19A word in this context is a sequence of characters delimited on both ends by
20white space (space, tab, line feed, start of file, or end of file).
21The commands for deleting characters and words also work on line feeds, making
22it possible to join two consecutive lines by deleting the line feed between them.
23.PP
24The editor maintains one save buffer (not displayed).
25Commands are present to move text from the file to the buffer, from the buffer
26to the file, and to write the buffer onto a new file.
27If the edited text cannot be written out due to a full disk, it may still
28be possible to copy the whole text to the save buffer and then write it to a
29different file on a different disk with CTRL-Q.
30It may also be possible to escape from the editor with CTRL-S and remove
31some files.
32.PP
33Some of the commands prompt for arguments (file names, search patterns, etc.).
34All commands that might result in loss of the file being edited prompt to ask
35for confirmation.
36.PP
37A key (command or ordinary character) can be repeated
38.I n
39times by typing
40.I "ESC n key"
41where
42.I ESC
43is the \*(OQescape\*(CQ key.
44.PP
45Forward and backward searching requires a regular expression as the search
46pattern.
47Regular expressions follow the same rules as in the
48.Ux
49editor,
50.I ed .
51These rules can be stated as:
52.LI
53.IT
54Any displayable character matches itself.
55.IT
56\&. (period) matches any character except line feed.
57.IT
58\&^ (circumflex) matches the start of the line.
59.IT
60\&$ (dollar sign) matches the end of the line.
61.IT
62\&\\c matches the character \fIc\fR (including period, circumflex, etc).
63.IT
64[\fIstring\fR] matches any of the characters in the string.
65.IT
66[^string] matches any of the characters except those in the string.
67.IT
68[\fIx\(eny\fR] matches any characters between \fIx\fR and \fIy\fR (e.g., [\fIa\(enz\fR]).
69.IT
70Pattern\(** matches any number of occurrences of \fIpattern\fR.
71.LX
72Some examples of regular expressions are:
73.HS
74.in +1.25i
75.ta +1.0i
76.ti -1.0i
77The boy matches the string \*(OQThe boy\*(CQ
78.ti -1.0i
79^$ matches any empty line.
80.ti -1.0i
81^.$ matches any line containing exactly 1 character
82.ti -1.0i
83^A.*\\.$ matches any line starting with an \fIA\fR, ending with a period.
84.ti -1.0i
85^[A\(enZ]*$ matches any line containing only capital letters (or empty).
86.ti -1.0i
87[A\(enZ0\(en9] matches any line containing either a capital letter or a digit.
88.ti -1.0i
89\&.*X$ matches any line ending in \*(OQX\*(CQ
90.ti -1.0i
91A.*B matches any line containing an \*(OQA\*(CQ and then a \*(OQB\*(CQ
92.in -1.25i
93.sp
94.PP
95Control characters cannot be entered into a file simply by typing them because
96all of them are editor commands.
97To enter a control character, depress the ALT key, and then while holding it
98down, hit the ESC key.
99Release both ALT and ESC and type the control character.
100Control characters are displayed in reverse video.
101.PP
102The
103.I mined
104commands are as follows.
105.sp
106.in +1.25i
107.ta +1.0i
108.ti -1.25i
109\fBCURSOR MOTION\fR
110.ti -1.0i
111\fBarrows\fR Move the cursor in the indicated direction
112.ti -1.0i
113\fBCTRL-A\fR Move cursor to start of current line
114.ti -1.0i
115\fBCTRL-Z\fR Move cursor to end of current line
116.ti -1.0i
117\fBCTRL-^\fR Move cursor to top of screen
118.ti -1.0i
119\fBCTRL-_\fR Move cursor to end of screen
120.ti -1.0i
121\fBCTRL-F\fR Move cursor forward to start of next word
122.ti -1.0i
123\fBCTRL-B\fR Move cursor backward to start of previous word
124
125.ti -1.25i
126\fBSCREEN MOTION\fR
127.ti -1.0i
128\fBHome key\fR Move to first character of the file
129.ti -1.0i
130\fBEnd key\fR Move to last character of the file
131.ti -1.0i
132\fBPgUp key\fR Scroll window up 23 lines (closer to start of the file)
133.ti -1.0i
134\fBPgDn key\fR Scroll window down 23 lines (closer to end of the file)
135.ti -1.0i
136\fBCTRL-U\fR Scroll window up 1 line
137.ti -1.0i
138\fBCTRL-D\fR Scroll window down 1 line
139
140.ti -1.25i
141\fBMODIFYING TEXT\fR
142.ti -1.0i
143\fBDel key\fR Delete the character under the cursor
144.ti -1.0i
145\fBBackspace\fR Delete the character to left of the cursor
146.ti -1.0i
147\fBCTRL-N\fR Delete the next word
148.ti -1.0i
149\fBCTRL-P\fR Delete the previous word
150.ti -1.0i
151\fBCTRL-T\fR Delete tail of line (all characters from cursor to end of line)
152.ti -1.0i
153\fBCTRL-O\fR Open up the line (insert line feed and back up)
154.ti -1.0i
155\fBCTRL-G\fR Get and insert a file at the cursor position
156
157.ti -1.25i
158\fBBUFFER OPERATIONS\fR
159.ti -1.0i
160\fBCTRL-@\fR Set mark at current position for use with CTRL-C and CTRL-K
161.ti -1.0i
162\fBCTRL-C\fR Copy the text between the mark and the cursor into the buffer
163.ti -1.0i
164\fBCTRL-K\fR Delete text between mark and cursor; also copy it to the buffer
165.ti -1.0i
166\fBCTRL-Y\fR Yank contents of the buffer out and insert it at the cursor
167.ti -1.0i
168\fBCTRL-Q\fR Write the contents of the buffer onto a file
169
170.ti -1.25i
171\fBMISCELLANEOUS\fR
172.ti -1.0i
173\fBnumeric +\fR Search forward (prompts for regular expression)
174.ti -1.0i
175\fBnumeric \(mi\fR Search backward (prompts for regular expression)
176.ti -1.0i
177\fBnumeric 5\fR Display the file status
178.ti -1.0i
179\fBCTRL-]\fR Go to specific line
180.ti -1.0i
181\fBCTRL-R\fR Global replace \fIpattern\fR with \fIstring\fR (from cursor to end)
182.ti -1.0i
183\fBCTRL-L\fR Line replace \fIpattern\fR with \fIstring\fR
184.ti -1.0i
185\fBCTRL-W\fR Write the edited file back to the disk
186.ti -1.0i
187\fBCTRL-X\fR Exit the editor
188.ti -1.0i
189\fBCTRL-S\fR Fork off a shell (use CTRL-D to get back to the editor)
190.ti -1.0i
191\fBCTRL-\\\fR Abort whatever the editor was doing and wait for command
192.ti -1.0i
193\fBCTRL-E\fR Erase screen and redraw it
194.ti -1.0i
195\fBCTRL-V\fR Visit (edit) a new file
196.in -1.25i
197
198.SS "Author"
199.PP
200\fIMined\fR was designed by Andy Tanenbaum and written by Michiel Huisjes.
Note: See TracBrowser for help on using the repository browser.