📄 yap.1
字号:
.\" $Header: yap.1,v 6.2 88/04/29 11:47:43 ceriel Exp $.\" nroff -man yap.1.tr ~.TH YAP 1 local.SH NAMEyap, more \- yet another pager.SH SYNOPSIS.B yap[.B \-cnuq][.B \-\fIn\fP][.B +\fIcommand\fP ] [ name ... ].SH DESCRIPTION.I Yapis a program allowing the user to examine a continuous text one screenful ata time on a video display terminal.It does so bypausing after each screenful, waiting for the user to type a command.The commands are enumerated later..IR Yap 'smain feature is, that it can page both forwards and backwards,even when reading from standard input..PPThe command line options are:.TP.I \-nAn integer which is the size (in lines) of a page (the initial.IR page-size ..TP.B \-cNormally,.I yapwill display each page by beginning at the top of the screen and erasing each line just before it displays on it. If your terminal cannot erase a line,.I yapwill clear the screen before it displays a page..brThis avoids scrolling the screen, making it easier to read while .I yap is writing.The.B -coption causes.I yapto scroll the screen instead of beginning at the top of the screen.This is also done if your terminal cannot either erase a line or clear thescreen..TP.B \-uNormally,.I yaphandles underlining such as produced by nroff in a manner appropriateto the particular terminal: if the terminal can perform underlining well(t.i., the escape sequences for underlining do not occupy space on thescreen),.I yapwill underline underlined information in the input. The.B -uoption supresses this underlining..TP.B \-nNormally,.I yapalso recognises escape sequences for stand-out mode or underlining modein the input, and knows how much space these escape sequences willoccupy on the screen, so that.I yapwill not fold lines erroneously.The.B -noption supresses this pattern matching..TP.B \-qThis option will cause.I yapto exit only on the "quit" command..TP.BI + command\fIcommand\fP is taken to be an initial command to.IR yap ..PP.I Yapuses the.IR termcap (5)database to determine the terminal capabilities and the default .IR page-size .It examines the $TERM environment variable to identify the terminal type.If $TERM is not set, it defaults to.IR dumb ..I YapAlso examines the $TERMCAP environment variable to locate the.IR termcap (5)database.If $TERMCAP is not set, it defaults to.IR /etc/termcap ..PP.I Yaplooks in the $YAP environment variableto pre-set flags.For instance, if you prefer the.B -cmode of operation, just set the $YAP environment variableto.BR -c ..PPThe commands of.I yapcan be bound to sequences of keystrokes.The environment variable $YAPKEYS may contain the bindings in theform of a list of colon-separated `name=sequence' pairs.The.I nameis a short mnemonic for the command, the.I sequenceis the sequence of keystrokes to be typed to invoke the command.This sequence may contain a ^X escape, which means control-X,and a \\X escape, which means X. The latter can be used to getthe characters `^', `\\' and `:' in the sequence.There are two keymaps available, the default one and a user-defined one.You can switch between one and the other with the.I change keymapcommand..PPThe.I yapcommands are described below.The mnemonics for the commands are given in parentheses. The defaultkey sequences (if any) are given after the mnemonic.Every command takes an optional integer argument, which may be typedbefore the command. Some commands just ignore it. The integer argumentis referred to as.IR i .Usually, if.I iis not given, it defaults to 1..de Nc.PP\&\\$1.RI ( \\$2 ).BR \\$3.br.RS...de Ec.RE...Nc "visit previous file" bf PVisit the.IR i -thprevious file given in the command line..Ec.Nc "scroll one line up or go to line" bl "^K ~or~ k"If.I iis not given, scroll one line up. Otherwise,.I iwill be interpreted as a line number. A page starting with the lineindicated will then be displayed..Ec.Nc "bottom" bot "l ~or~ $"Go to the last line of the input..Ec.Nc "display previous page" bp -Display the previous page, consisting of.I ilines, (or.I page-sizelines if no argument is given)..Ec.Nc "display previous page and set pagesize" bps ZDisplay the previous page, consisting of.I ilines, (or.I page-sizelines if no argument is given).If.I iis given, the.I page-sizeis set to.IR i ..Ec.Nc "scroll up" bs ^BScroll up.I ilines (or.I scroll-sizelines if.I iis not given. Initially, the.I scroll-sizeis 11)..Ec.Nc "search backwards for pattern" bse ?Search backwards for the.IR i -thoccurrence of a regular expression which will be prompted for.If there are less than.I ioccurrences of the expression, the position in the file remains unchanged.Otherwise, a page is displayed, starting two lines before the place where theexpression was found. The user's erase and kill characters may be usedto edit the expression.Erasing back past the first character cancels the search command..brNote: Some systems do not have.IR regex (3).On those systems, searches are still supported, but regular expressionsare not..Ec.Nc "skip lines backwards" bsl SSkip.I ilines backwards and display a page..Ec.Nc "skip pages backwards" bsp FSkip.I ipages backwards and display a page..Ec.Nc "scroll up and set scrollsize" bss bScroll up.I ilines (or.I scroll-sizelines if.I iis not given.If.I iis given, the.I scroll-sizeis set to.IR i ..Ec.Nc "change key map" chm ^[Change from the current key map to the other (if there is one)..Ec.Nc "exchange current page and mark" exg xSet the mark to the current page, and display the previously markedpage..Ec.Nc "visit next file" ff NVisit the.IR i -thnext file given in the command line..Ec.Nc "scroll one line down or go to line" fl "^J ~or~ ^M ~or~ j"If.I iis not given, scroll one line down. Otherwise,.I iwill be interpreted as a line number. A page starting with the lineindicated will then be displayed..Ec.Nc "display next page" fp <space>Display the next page, consisting of.I ilines, (or.I page-sizelines if no argument is given)..Ec.Nc "display next page and set pagesize" fps zDisplay the next page, consisting of.I ilines, (or.I page-sizelines if no argument is given).If.I iis given, the.I page-sizeis set to.IR i ..Ec.Nc "scroll down" fs ^DScroll down .I ilines (or.I scroll-sizelines if no argument is given)..Ec.Nc "search forwards for pattern" fse /Search forwards for the.IR i -thoccurrence of a regular expression which will be prompted for.If there are less than.I ioccurrences of the expression, the position in the file remains unchanged.Otherwise, a page is displayed, starting two lines before the place where theexpression was found. The user's erase and kill characters may be usedto edit the expression.Erasing back past the first character cancels the search command..brNote: Some systems do not have.IR regex (3).On those systems, searches are still supported, but regular expressionsare not..Ec.Nc "skip lines forwards" fsl sSkip.I ilines and display a page..Ec.Nc "skip pages forwards" fsp fSkip.I ipages and display a page..Ec.Nc "scroll down and set scrollsize" fss dScroll down.I ilines (or.I scroll-sizelines if.I iis not given.If.I iis given, the.I scroll-sizeis set to.IR i ..Ec.Nc "help" hlp hGive a short description of all commands that are bound to a key sequence..Ec.Nc "set a mark" mar mSet a mark on the current page..Ec.Nc "repeat last search" nse nSearch for the .IR i -thoccurrence of the last regular expression entered, in the direction of thelast search..Ec.Nc "repeat last search in other direction" nsr rSearch for the.IR i -thoccurrence of the last regular expression entered, but in the other direction..Ec.Nc "quit" qui "Q ~or~ q"Exit from.IR yap ..Ec.Nc "redraw" red ^LRedraw the current page..Ec.Nc "repeat" rep .Repeat the last command. This does not always make sense, so not allcommands can be repeated..Ec.Nc "shell escape" shl !Invoke the shell with a command that will be prompted for.In the command, the characters `%' and `!' are replaced with thecurrent file name and the previous shell command respectively.The sequences `\\%' and `\\!' are replaced by `%' and `!' respectively.The user's erase and kill characters can be used to edit the command.Erasing back past the first character cancels the command..Ec.Nc "pipe to shell command" pip |Pipe the current input file into a shell command that will be prompted for.The comments given in the description of the shell escape command apply heretoo..Ec.Nc "go to mark" tom 'Display the marked page..Ec.Nc "top" top ^^Display a page starting with the first line of the input..Ec.Nc "visit file" vis eVisit a new file. The filename will be prompted for. If you justtype a return, the current file is revisited..Ec.Nc "write input to a file" wrf wWrite the input to a file, whose name will be prompted for..Ec.PPThe commands take effect immediately, i.e., it is not necessary totype a carriage return.Up to the time when the command sequence itself is given,the user may give an interrupt to cancel the commandbeing formed..SH AUTHORCeriel J.H. Jacobs.SH FILES.DT/etc/termcap Terminal capabilities data base.SH SEE ALSO.IR termcap (5), ~regex (3)..SH BUGS.I Yapwill find your terminal very stupid and act like it,if it has no way of placing thecursor on the home position, or cannot eithererase a line orinsert one..PPIn lines longer than about 2000 characters, a linefeed is silently inserted..PPThe percentage, given in the prompt when.I yapreads from a file (and knows it), is not always very accurate.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -