⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 elvis.9

📁 Unix操作系统minix 2.0源码
💻 9
📖 第 1 页 / 共 3 页
字号:
new file..ti -0.25i.B charattr.brMany text formatting programs allow you to designate portions ofyour text to be underlined, italicized, or boldface by embeddingthe special strings \\fU, \\fI, and \\fB in your text.  The specialstring \\fR marks the end of underlined or boldface text.\fIElvis\fR normally treats those special strings just like any othertext.However, if the \fIcharattr\fR option is on, then \fIelvis\fR will interpretthose special strings correctly, to display underlined or boldfacetext on the screen.  (This only works, of course, if your terminalcan display underlined and boldface, and if the TERMCAP entry sayshow to do it.).ti -0.25i.B columns.brThis is a \*(OQread only\*(CQ option.  You cannot change its value, but youcan have \fIelvis\fR print it.  It shows how wide your screen is..ti -0.25i.B directory.brElvis uses temporary files to store changed text.This option allows you to control where those temporary files will be.Ideally, you should store them on in fast non-volatile memory,such as a hard disk.This option can only be set in the ".exrc" file..ti -0.25i.B errorbells.brNormally, \fIelvis\fR will ring your terminal's bell if you make an error.However, in noerrorbells mode, your terminal will remain silent..ti -0.25i.B exrefresh.brThe EX mode of \fIelvis\fR writes many lines to the screen.  You can make\fIelvis\fR either write each line to the screen separately, or save upmany lines and write them all at once.The exrefresh option is normally on, so each line is written to thescreen separately.You may wish to turn the exrefresh option off (:se noer) if the\*(OQwrite\*(CQ system call is costly on your machine, or if you're using awindowing environment.  (Windowing environments scroll text a lotfaster when you write many lines at once.)This option has no effect in \fIvi\fR mode..ti -0.25i.B ignorecase.brNormally, when \fIelvis\fR searches for text, it treats uppercase lettersas being different for lowercase letters.When the ignorecase option is on, uppercase and lowercase are treatedas equal..ti -0.25i.B keytime.brThe arrow keys of most terminals send a multi-character sequence.It takes a measurable amount of time for these sequences to betransmitted.  The keytime option allows you to control the maximumamount of time to allow for an arrow key (or other mapped key) tobe received in full.The default keytime value is 2.  Because of the way .Uxtimekeeping works, the actual amount of time allowed will vary slightly, but itwill always be between 1 and 2 seconds.If you set keytime to 1, then the actual amount of time allowed willbe between 0 and 1 second.  This will generally make the keyboard'sresponse be a little faster (mostly for the ESC key), but on thoseoccasions where the time allowed happens to be closer to 0 than 1second, \fIelvis\fR may fail to allow enough time for an arrow key'ssequence to be received fully.  Ugh.As a special case, you can set keytime to 0 to disable this timelimit stuff altogether.  The big problem here is:  If your arrowkeys' sequences start with an ESC, then every time you hit your ESCkey \fIelvis\fR will wait... and wait... to see if maybe that ESC waspart of an arrow key's sequence.NOTE: this option is a generalization of the timeout option of thereal vi..ti -0.25i.B keywordprg.br\fIElvis\fR has a special keyword lookup feature.  You move the cursoronto a word, and hit shift-K, and \fIelvis\fR uses another program tolook up the word and display information about it.This option says which program gets run.  It should contain the fullpathname of the program; your whole execution path is \fInot\fR checked.The default value of this option is \fI/usr/bin/ref\fR, which is aprogram that looks up the definition of a function in C.  It looksup the function name in a file called \*(OQrefs\*(CQ which is created byctags.You can substitute other programs, such as an English dictionaryprogram or the online manual.  \fIelvis\fR runs the program, using thekeyword as its only argument.  The program should write informationto stdout.  The program's exit status should be 0, unless you want\fIelvis\fR to print \*(OQ<<< failed >>>"..ti -0.25i.B lines.brThis \*(OQread only\*(CQ option shows how many lines you screen has..ti -0.25i.B list.brNormally (in \*(OQnolist" mode) \fIelvis\fR will expand tabs to the propernumber of spaces on the screen, so that the file appears the same would it wouldbe if you printed it or looked at it with \fImore\fR.Sometimes, though, it can be handy to have the tabs displayed as \*(OQ^I".In \*(OQlist" mode, \fIelvis\fR does this, and also displays a \*(OQ$"after the end of the line..ti -0.25i.B magic.brThe search mechanism in \fIelvis\fR can accept \*(OQregular expressions\*(CQ\(emstrings in which certain characters have special meaning.The magic option is normally on, which causes these characters tobe treated specially.If you turn the magic option off (:se noma), then all charactersexcept ^ and $ are treated literally.   ^ and $ retain their specialmeanings regardless of the setting of magic..ti -0.25i.B paragraphs.brThe { and } commands move the cursor forward or backward in incrementsof one paragraph.  Paragraphs may be separated by blank lines, or bya \*(OQdot\*(CQ command of a text formatter.  Different text formatters usedifferent \*(OQdot\*(CQ commands.  This option allows you to configure \fIelvis\fRto work with your text formatter.It is assumed that your formatter uses commands that start with a".\*(CQ character at the front of a line, and then have a one- ortwo-character command name.The value of the paragraphs option is a string in which each pairof characters is one possible form of your text formatter's paragraphcommand..ti -0.25i.B readonly.brNormally, \fIelvis\fR will let you write back any file to which you havewrite permission.  If you do not have write permission, then youcan only write the changed version of the file to a \fIdifferent\fRfile.If you set the readonly option, then \fIelvis\fR will pretend you do nothave write permission to \fIany\fR file you edit.  It is useful whenyou really only mean to use \fIelvis\fR to look at a file, not to changeit.  This way you cannot change it accidentally.This option is normally off, unless you use the \*(OQview\*(CQ alias of \fIelvis\fR.\*(OQView\*(CQ is like \fIvi\fR except that the readonly option is on..ti -0.25i.B report.brCommands in \fIelvis\fR may affect many lines.  For commands that affecta lot of lines, \fIelvis\fR will output a message saying what was done andhow many lines were affected.  This option allows you to definewhat \*(OQa lot of lines\*(CQ means.  The default is 5, so any command whichaffects 5 or more lines will cause a message to be shown..ti -0.25i.B scroll.brThe CTRL-U and CTRL-D keys normally scroll backward or forwardby half a screenful, but this is adjustable.  The value of this optionsays how many lines those keys should scroll by..ti -0.25i.B sections.brThe [[ and ]] commands move the cursor backward or forward inincrement of 1 section.  Sections may be delimited by a { characterin column 1 (which is useful for C source code) or by means ofa text formatter's \*(OQdot\*(CQ commands.This option allows you to configure \fIelvis\fR to work with your textformatter's \*(OQsection\*(CQ command, in exactly the same way that theparagraphs option makes it work with the formatter's \*(OQparagraphs"command..ti -0.25i.B shell.brWhen \fIelvis\fR forks a shell (perhaps for the :! or :shell commands)this is the program that is uses as a shell.  This is \fI/bin/sh\fRby default, unless you have set the SHELL environment variable,it which case the default value is copied from the environment..ti -0.25i.B shiftwidth.brThe < and > commands shift text left or right by some uniform numberof columns.  The shiftwidth option defines that uniform number.The default is 8..ti -0.25i.B sidescroll.brFor long lines, \fIelvis\fR scrolls sideways.  (This is different fromthe real \fIvi\fR, which wraps a single long line onto several rows ofthe screen.)To minimize the number of scrolls needed, \fIelvis\fR moves the screensideways by several characters at a time.  The value of this optionsays how many characters' widths to scroll at a time.Generally, the faster your screen can be redrawn, the lower the valueyou will want in this option..ti -0.25i.B sync.brIf the system crashes during an edit session, then most of your workcan be recovered from the temporary file that \fIelvis\fR uses to storechanges.  However, sometimes .MXwill not copy changes to thehard disk immediately, so recovery might not be possible.  The [no]syncoption lets you control this.In nosync mode (which is the default), \fIelvis\fR lets the operating systemcontrol when data is written to the disk.  This is generally faster.In sync mode, \fIelvis\fR forces all changes out to disk every time you makea change.  This is generally safer, but slower..ti -0.25i.B tabstop.brTab characters are normally 8 characters wide, but you can changetheir widths by means of this option..ti -0.25i.B term.brThis \*(OQread only\*(CQ option shows the name of the termcap entry that\fIelvis\fR is using for your terminal..ti -0.25i.B vbell.brIf your termcap entry describes a visible alternative to ringingyour terminal's bell, then this option will say whether the visibleversion gets used or not.  Normally it will be.If your termcap does NOT include a visible bell capability, thenthe vbell option will be off, and you cannot turn it on..ti -0.25i.B warn.br\fIElvis\fR will normally warn you if you run a shell command without savingyour changed version of a file.The \*(OQnowarn" option prevents this warning..ti -0.25i.B wrapmargin.brNormally (with wrapmargin=0) \fIelvis\fR will let you type in extremely longlines, if you wish.However, with wrapmargin set to something other that 0 (wrapmargin=65is nice), \fIelvis\fR will automatically cause long lines to be \*(OQwrapped"on a word break for lines longer than wrapmargin's setting..ti -0.25i.B wrapscan.brNormally, when you search for something, \fIelvis\fR will find it no matterwhere it is in the file.  \fIelvis\fR starts at the cursor position, andsearches forward.  If \fIelvis\fR hits EOF without finding what you'relooking for, then it wraps around to continue searching from line 1.If you turn off the wrapscan option (:se nows), then when \fIelvis\fR hitsEOF during a search, it will stop and say so..in -0.25i.SS "Cflags".PP\fIElvis\fR uses many preprocessor symbols to control compilation.Most of these flags allow you to disable small sets of features.\s-2MINIX\s0-ST users will probably want all features enabled, but\s-2MINIX\s0-PC users will have to disable one or two feature setsbecause otherwise \fIelvis\fR would be too large to compile and run.These symbols can be defined via flags passed to the compiler.The best way to do this is to edit the Makefile, and append the flagto the \*(OQCFLAGS=\*(CQ line.After you do that, you must recompile elvis completely by saying.HS.Cx "make  clean".br.Cx "make".HS.in +0.25i.ti -0.25i.B \(enDM_SYSV.brThis flag causes \fIelvis\fR to use System-V ioctl() calls for controllingyour terminal; normally it uses v7/BSD/\s-2MINIX\s0 ioctl() calls..ti -0.25i.B \(enDDATE.brThe symbol DATE should be defined to look like a string constant,giving the date when \fIelvis\fR was compiled.This date is reported by the \*(OQ:version\*(CQ command.You can also leave DATE undefined, in which case \*(OQ:version\*(CQ will notreport the compilation date..ti -0.25i.B \(enDCRUNCH.brThis flag causes several large often-used macros to be replaced byequivalent functions.This saves about 4K of space in the \*(OQ.text\*(CQ segment, and it does notcost you any features..ti -0.25i.B \(enDDEBUG.brThis adds many internal consistency checks and the \*(OQ:debug\*(CQ and \*(OQ:validate\*(CQcommands.  It increases the size of \*(OQtext\*(CQ by about 5K bytes..ti -0.25i.B \(enDNO_CHARATTR.brThis permanenently disables the \*(OQcharattr\*(CQ option.It reduces the size of \*(OQ.text\*(CQ by about 850 bytes..ti -0.25i.B \(enDNO_RECYCLE.brNormally, \fIelvis\fR will recycle space in the temporary file which containstotally obsolete text.The \fB\(enDNO_RECYCLE\fR option disables this, making your \*(OQ.text\*(CQ  segment smaller by about 1K but also permitting the temporary file to grow very quickly.If you have less than two megabytes of free space on your disk,then do not even consider using this flag..ti -0.25i.B \(enDNO_SENTENCE.brThis leaves out the \*(OQ(\*(CQ and \*(OQ)\*(CQ visual commands, and removes the code that allows the \*(OQ[[\*(CQ, \*(OQ]]\*(CQ, \*(OQ{\*(CQ, and \*(OQ}\*(CQ commands to recognize \fRnroff\fR macros.The \*(OQ[[\*(CQ and \*(OQ]]\*(CQ commands will still move to the start of the previous/next C function source code, though, and \*(OQ{\*(CQ and \*(OQ}\*(CQ will move to the previous/next blank line.This saves about 650 bytes from the \*(OQ.text\*(CQ segment..ti -0.25i.B \(enDNO_CHARSEARCH.brThis leaves out the visual commands which locate a given character in thecurrent line: \*(OQf\*(CQ, \*(OQt\*(CQ, \*(OQF\*(CQ, \*(OQT\*(CQ, \*(OQ;\*(CQ, and \*(OQ,\*(CQ.This saves about 900 bytes..ti -0.25i.B \(enDNO_EXTENSIONS.brThis leaves out the \*(OQ:mkexrc\*(CQ command, and the \*(OQK\*(CQ and \*(OQ#\*(CQ visual commands.Other extensions are either inherent in the design of \fIelvis\fR,or are too tiny to be worth removing.This saves about 500 bytes..ti -0.25i.B \(enDNO_MAGIC.brThis permanently disables the \*(OQmagic\*(CQ option, so that most meta-characters in a regular expression are not recognized.  This saves about 3K bytes from the \*(OQ.text\*(CQ segment..HS.in -0.25i.SS "Termcap"\fIElvis\fR can use standard termcap entries,but it also recognizes and uses several extra capabilities, if you give them.All of these are optional..nf.in +0.25i.ta 1.5i.HS\fBCapability	Description\fR:PU=:	sequence received from the <PgUp> key:PD=:	sequence received from the <PgDn> key:HM=:	sequence received from the <Home> key:EN=:	sequence received from the <End> key:VB=:	sequence sent to start bold printing:Vb=:	sequence sent to end bold printing.in -0.25i.SS "Author".PP\fIElvis\fR was written by Steve Kirkendall.He can be reached by email at: kirkenda@cs.pdx.edufor comments regarding \fIelvis\fR.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -