source: trunk/minix/man/man1/yap.1@ 15

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

Minix 3.1.2a

File size: 9.1 KB
Line 
1.\" $Header: /cvsup/minix/src/man/man1/yap.1,v 1.1 2005/05/02 13:01:39 beng Exp $
2.\" nroff -man yap.1
3.tr ~
4.TH YAP 1 local
5.SH NAME
6yap, more \- yet another pager
7.SH SYNOPSIS
8.B yap
9.RB [ \-cnuq ]
10.RB [ \-\fIn\fP ]
11.RB [ +\fIcommand\fP ]
12.RI [ file " ...]"
13.SH DESCRIPTION
14.B Yap
15is a program allowing the user to examine a continuous text one screenful at
16a time on a video display terminal.
17It does so by
18pausing after each screenful, waiting for the user to type a command.
19The commands are enumerated later.
20.BR Yap 's
21main feature is, that it can page both forwards and backwards,
22even when reading from standard input.
23.PP
24The command line options are:
25.TP
26.I \-n
27An integer which is the size (in lines) of a page (the initial
28.IR page-size .
29.TP
30.B \-c
31Normally,
32.B yap
33will display each page by beginning at the top of the screen and erasing
34each line just before it displays on it. If your terminal cannot erase a line,
35.B yap
36will clear the screen before it displays a page.
37.br
38This avoids scrolling the screen, making it easier to read while
39.B yap
40is writing.
41The
42.B -c
43option causes
44.B yap
45to scroll the screen instead of beginning at the top of the screen.
46This is also done if your terminal cannot either erase a line or clear the
47screen.
48.TP
49.B \-u
50Normally,
51.B yap
52handles underlining such as produced by nroff in a manner appropriate
53to the particular terminal: if the terminal can perform underlining well
54(t.i., the escape sequences for underlining do not occupy space on the
55screen),
56.B yap
57will underline underlined information in the input. The
58.B -u
59option supresses this underlining.
60.TP
61.B \-n
62Normally,
63.B yap
64also recognises escape sequences for stand-out mode or underlining mode
65in the input, and knows how much space these escape sequences will
66occupy on the screen, so that
67.B yap
68will not fold lines erroneously.
69The
70.B -n
71option supresses this pattern matching.
72.TP
73.B \-q
74This option will cause
75.B yap
76to exit only on the "quit" command.
77.TP
78.BI + command
79\fIcommand\fP is taken to be an initial command to
80.BR yap .
81.PP
82.B Yap
83looks in the
84.B YAP
85environment variable
86to pre-set flags.
87For instance, if you prefer the
88.B -c
89mode of operation, just set the
90.B YAP
91environment variable to
92.BR -c .
93.PP
94The commands of
95.B yap
96can be bound to sequences of keystrokes.
97The environment variable
98.B YAPKEYS
99may contain the bindings in the
100form of a list of colon-separated `name=sequence' pairs.
101The
102.I name
103is a short mnemonic for the command, the
104.I sequence
105is the sequence of keystrokes to be typed to invoke the command.
106This sequence may contain a ^X escape, which means control-X,
107and a \\X escape, which means X. The latter can be used to get
108the characters `^', `\\' and `:' in the sequence.
109There are two keymaps available, the default one and a user-defined one.
110You can switch between one and the other with the
111.I change keymap
112command.
113.PP
114The
115.B yap
116commands are described below.
117The mnemonics for the commands are given in parentheses. The default
118key sequences (if any) are given after the mnemonic.
119Every command takes an optional integer argument, which may be typed
120before the command. Some commands just ignore it. The integer argument
121is referred to as
122.IR i .
123Usually, if
124.I i
125is not given, it defaults to 1.
126.de Nc
127.PP
128\&\\$1
129.RI ( \\$2 )
130.BR \\$3
131.br
132.RS
133..
134.de Ec
135.RE
136..
137.Nc "visit previous file" bf P
138Visit the
139.IR i -th
140previous file given in the command line.
141.Ec
142.Nc "scroll one line up or go to line" bl "^K ~or~ k"
143If
144.I i
145is not given, scroll one line up. Otherwise,
146.I i
147will be interpreted as a line number. A page starting with the line
148indicated will then be displayed.
149.Ec
150.Nc "bottom" bot "l ~or~ $"
151Go to the last line of the input.
152.Ec
153.Nc "display previous page" bp -
154Display the previous page, consisting of
155.I i
156lines, (or
157.I page-size
158lines if no argument is given).
159.Ec
160.Nc "display previous page and set pagesize" bps Z
161Display the previous page, consisting of
162.I i
163lines, (or
164.I page-size
165lines if no argument is given).
166If
167.I i
168is given, the
169.I page-size
170is set to
171.IR i .
172.Ec
173.Nc "scroll up" bs ^B
174Scroll up
175.I i
176lines (or
177.I scroll-size
178lines if
179.I i
180is not given. Initially, the
181.I scroll-size
182is 11).
183.Ec
184.Nc "search backwards for pattern" bse ?
185Search backwards for the
186.IR i -th
187occurrence of a regular expression which will be prompted for.
188If there are less than
189.I i
190occurrences of the expression, the position in the file remains unchanged.
191Otherwise, a page is displayed, starting two lines before the place where the
192expression was found. The user's erase and kill characters may be used
193to edit the expression.
194Erasing back past the first character cancels the search command.
195.br
196Note: Some systems do not have
197.BR regex (3).
198On those systems, searches are still supported, but regular expressions
199are not.
200.Ec
201.Nc "skip lines backwards" bsl S
202Skip
203.I i
204lines backwards and display a page.
205.Ec
206.Nc "skip pages backwards" bsp F
207Skip
208.I i
209pages backwards and display a page.
210.Ec
211.Nc "scroll up and set scrollsize" bss b
212Scroll up
213.I i
214lines (or
215.I scroll-size
216lines if
217.I i
218is not given.
219If
220.I i
221is given, the
222.I scroll-size
223is set to
224.IR i .
225.Ec
226.Nc "change key map" chm X
227Change from the current key map to the other (if there is one).
228.Ec
229.Nc "exchange current page and mark" exg x
230Set the mark to the current page, and display the previously marked
231page.
232.Ec
233.Nc "visit next file" ff N
234Visit the
235.IR i -th
236next file given in the command line.
237.Ec
238.Nc "scroll one line down or go to line" fl "^J ~or~ ^M ~or~ j"
239If
240.I i
241is not given, scroll one line down. Otherwise,
242.I i
243will be interpreted as a line number. A page starting with the line
244indicated will then be displayed.
245.Ec
246.Nc "display next page" fp <space>
247Display the next page, consisting of
248.I i
249lines, (or
250.I page-size
251lines if no argument is given).
252.Ec
253.Nc "display next page and set pagesize" fps z
254Display the next page, consisting of
255.I i
256lines, (or
257.I page-size
258lines if no argument is given).
259If
260.I i
261is given, the
262.I page-size
263is set to
264.IR i .
265.Ec
266.Nc "scroll down" fs ^D
267Scroll down
268.I i
269lines (or
270.I scroll-size
271lines if no argument is given).
272.Ec
273.Nc "search forwards for pattern" fse /
274Search forwards for the
275.IR i -th
276occurrence of a regular expression which will be prompted for.
277If there are less than
278.I i
279occurrences of the expression, the position in the file remains unchanged.
280Otherwise, a page is displayed, starting two lines before the place where the
281expression was found. The user's erase and kill characters may be used
282to edit the expression.
283Erasing back past the first character cancels the search command.
284.br
285Note: Some systems do not have
286.BR regex (3).
287On those systems, searches are still supported, but regular expressions
288are not.
289.Ec
290.Nc "skip lines forwards" fsl s
291Skip
292.I i
293lines and display a page.
294.Ec
295.Nc "skip pages forwards" fsp f
296Skip
297.I i
298pages and display a page.
299.Ec
300.Nc "scroll down and set scrollsize" fss d
301Scroll down
302.I i
303lines (or
304.I scroll-size
305lines if
306.I i
307is not given.
308If
309.I i
310is given, the
311.I scroll-size
312is set to
313.IR i .
314.Ec
315.Nc "help" hlp h
316Give a short description of all commands that are bound to a key sequence.
317.Ec
318.Nc "set a mark" mar m
319Set a mark on the current page.
320.Ec
321.Nc "repeat last search" nse n
322Search for the
323.IR i -th
324occurrence of the last regular expression entered, in the direction of the
325last search.
326.Ec
327.Nc "repeat last search in other direction" nsr r
328Search for the
329.IR i -th
330occurrence of the last regular expression entered, but in the other direction.
331.Ec
332.Nc "quit" qui "Q ~or~ q"
333Exit from
334.BR yap .
335.Ec
336.Nc "redraw" red ^L
337Redraw the current page.
338.Ec
339.Nc "repeat" rep .
340Repeat the last command. This does not always make sense, so not all
341commands can be repeated.
342.Ec
343.Nc "shell escape" shl !
344Invoke the shell with a command that will be prompted for.
345In the command, the characters `%' and `!' are replaced with the
346current file name and the previous shell command respectively.
347The sequences `\\%' and `\\!' are replaced by `%' and `!' respectively.
348The user's erase and kill characters can be used to edit the command.
349Erasing back past the first character cancels the command.
350.Ec
351.Nc "pipe to shell command" pip |
352Pipe the current input file into a shell command that will be prompted for.
353The comments given in the description of the shell escape command apply here
354too.
355.Ec
356.Nc "go to mark" tom '
357Display the marked page.
358.Ec
359.Nc "top" top ^^
360Display a page starting with the first line of the input.
361.Ec
362.Nc "visit file" vis e
363Visit a new file. The filename will be prompted for. If you just
364type a return, the current file is revisited.
365.Ec
366.Nc "write input to a file" wrf w
367Write the input to a file, whose name will be prompted for.
368.Ec
369.PP
370The commands take effect immediately, i.e., it is not necessary to
371type a carriage return.
372Up to the time when the command sequence itself is given,
373the user may give an interrupt to cancel the command
374being formed.
375.SH AUTHOR
376Ceriel J.H. Jacobs
377.SH SEE ALSO
378.BR regex (3).
379.SH BUGS
380.B Yap
381will find your terminal very stupid and act like it,
382if it has no way of placing the
383cursor on the home position, or cannot either
384erase a line or
385insert one.
386.PP
387In lines longer than about 2000 characters, a linefeed is silently inserted.
388.PP
389The percentage, given in the prompt when
390.B yap
391reads from a file (and knows it), is not always very accurate.
Note: See TracBrowser for help on using the repository browser.