📄 elvis.9
字号:
new file.
charattr
Many text formatting programs allow you to designate portions of your
text to be underlined, italicized, or boldface by embedding the
special strings \fU, \fI, and \fB in your text. The special string
\fR marks the end of underlined or boldface text.
Elvis normally treats those special strings just like any other text.
However, if the charattr option is on, then elvis will interpret
those special strings correctly, to display underlined or boldface
text on the screen. (This only works, of course, if your terminal
can display underlined and boldface, and if the TERMCAP entry says
how to do it.)
columns
This is a 'read only' option. You cannot change its value, but you
can have elvis print it. It shows how wide your screen is.
directory
Elvis 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.
errorbells
Normally, elvis will ring your terminal's bell if you make an error.
However, in noerrorbells mode, your terminal will remain silent.
exrefresh
The EX mode of elvis writes many lines to the screen. You can make
elvis either write each line to the screen separately, or save up
many lines and write them all at once.
The exrefresh option is normally on, so each line is written to the
screen separately.
You may wish to turn the exrefresh option off (:se noer) if the
'write' system call is costly on your machine, or if you're using a
windowing environment. (Windowing environments scroll text a lot
faster when you write many lines at once.)
This option has no effect in vi mode.
ignorecase
Normally, when elvis searches for text, it treats uppercase letters
as being different for lowercase letters.
When the ignorecase option is on, uppercase and lowercase are treated
as equal.
keytime
The arrow keys of most terminals send a multi-character sequence. It
takes a measurable amount of time for these sequences to be
transmitted. The keytime option allows you to control the maximum
amount of time to allow for an arrow key (or other mapped key) to be
received in full.
The default keytime value is 2. Because of the way UNIX timekeeping
works, the actual amount of time allowed will vary slightly, but it
will always be between 1 and 2 seconds.
If you set keytime to 1, then the actual amount of time allowed will
be between 0 and 1 second. This will generally make the keyboard's
response be a little faster (mostly for the ESC key), but on those
occasions where the time allowed happens to be closer to 0 than 1
second, elvis may fail to allow enough time for an arrow key's
sequence to be received fully. Ugh.
As a special case, you can set keytime to 0 to disable this time
limit stuff altogether. The big problem here is: If your arrow
keys' sequences start with an ESC, then every time you hit your ESC
key elvis will wait... and wait... to see if maybe that ESC was part
of an arrow key's sequence.
NOTE: this option is a generalization of the timeout option of the
real vi.
keywordprg
Elvis has a special keyword lookup feature. You move the cursor onto
a word, and hit shift-K, and elvis uses another program to look up
the word and display information about it.
This option says which program gets run. It should contain the full
pathname of the program; your whole execution path is not checked.
The default value of this option is /usr/bin/ref, which is a program
that looks up the definition of a function in C. It looks up the
function name in a file called 'refs' which is created by ctags.
You can substitute other programs, such as an English dictionary
program or the online manual. elvis runs the program, using the
keyword as its only argument. The program should write information
to stdout. The program's exit status should be 0, unless you want
elvis to print '<<< failed >>>".
lines
This 'read only' option shows how many lines you screen has.
list
Normally (in 'nolist" mode) elvis will expand tabs to the proper
number of spaces on the screen, so that the file appears the same
would it would be if you printed it or looked at it with more.
Sometimes, though, it can be handy to have the tabs displayed as
'^I". In 'list" mode, elvis does this, and also displays a '$" after
the end of the line.
magic
The search mechanism in elvis can accept 'regular expressions'--
--strings in which certain characters have special meaning. The
magic option is normally on, which causes these characters to be
treated specially. If you turn the magic option off (:se noma), then
all characters except ^ and $ are treated literally. ^ and $ retain
their special meanings regardless of the setting of magic.
paragraphs
The { and } commands move the cursor forward or backward in
increments of one paragraph. Paragraphs may be separated by blank
lines, or by a 'dot' command of a text formatter. Different text
formatters use different 'dot' commands. This option allows you to
configure elvis to work with your text formatter.
It is assumed that your formatter uses commands that start with a ".'
character at the front of a line, and then have a one- or two-
character command name.
The value of the paragraphs option is a string in which each pair of
characters is one possible form of your text formatter's paragraph
command.
readonly
Normally, elvis will let you write back any file to which you have
write permission. If you do not have write permission, then you can
only write the changed version of the file to a different file.
If you set the readonly option, then elvis will pretend you do not
have write permission to any file you edit. It is useful when you
really only mean to use elvis to look at a file, not to change it.
This way you cannot change it accidentally.
This option is normally off, unless you use the 'view' alias of
elvis. 'View' is like vi except that the readonly option is on.
report
Commands in elvis may affect many lines. For commands that affect a
lot of lines, elvis will output a message saying what was done and
how many lines were affected. This option allows you to define what
'a lot of lines' means. The default is 5, so any command which
affects 5 or more lines will cause a message to be shown.
scroll
The CTRL-U and CTRL-D keys normally scroll backward or forward by
half a screenful, but this is adjustable. The value of this option
says how many lines those keys should scroll by.
sections
The [[ and ]] commands move the cursor backward or forward in
increment of 1 section. Sections may be delimited by a { character
in column 1 (which is useful for C source code) or by means of a text
formatter's 'dot' commands.
This option allows you to configure elvis to work with your text
formatter's 'section' command, in exactly the same way that the
paragraphs option makes it work with the formatter's 'paragraphs"
command.
shell
When elvis forks a shell (perhaps for the :! or :shell commands) this
is the program that is uses as a shell. This is /bin/sh by default,
unless you have set the SHELL environment variable, it which case the
default value is copied from the environment.
shiftwidth
The < and > commands shift text left or right by some uniform number
of columns. The shiftwidth option defines that uniform number. The
default is 8.
sidescroll
For long lines, elvis scrolls sideways. (This is different from the
real vi, which wraps a single long line onto several rows of the
screen.) To minimize the number of scrolls needed, elvis moves the
screen sideways by several characters at a time. The value of this
option says how many characters' widths to scroll at a time.
Generally, the faster your screen can be redrawn, the lower the value
you will want in this option.
sync
If the system crashes during an edit session, then most of your work
can be recovered from the temporary file that elvis uses to store
changes. However, sometimes MINIX will not copy changes to the hard
disk immediately, so recovery might not be possible. The [no]sync
option lets you control this. In nosync mode (which is the default),
elvis lets the operating system control when data is written to the
disk. This is generally faster. In sync mode, elvis forces all
changes out to disk every time you make a change. This is generally
safer, but slower.
tabstop
Tab characters are normally 8 characters wide, but you can change
their widths by means of this option.
term
This 'read only' option shows the name of the termcap entry that
elvis is using for your terminal.
vbell
If your termcap entry describes a visible alternative to ringing your
terminal's bell, then this option will say whether the visible
version gets used or not. Normally it will be.
If your termcap does NOT include a visible bell capability, then the
vbell option will be off, and you cannot turn it on.
warn
Elvis will normally warn you if you run a shell command without
saving your changed version of a file. The 'nowarn" option prevents
this warning.
wrapmargin
Normally (with wrapmargin=0) elvis will let you type in extremely
long lines, if you wish. However, with wrapmargin set to something
other that 0 (wrapmargin=65 is nice), elvis will automatically cause
long lines to be 'wrapped" on a word break for lines longer than
wrapmargin's setting.
wrapscan
Normally, when you search for something, elvis will find it no matter
where it is in the file. elvis starts at the cursor position, and
searches forward. If elvis hits EOF without finding what you're
looking for, then it wraps around to continue searching from line 1.
If you turn off the wrapscan option (:se nows), then when elvis hits
EOF during a search, it will stop and say so.
Cflags
Elvis uses many preprocessor symbols to control compilation. Most
of these flags allow you to disable small sets of features. MINIX-ST
users will probably want all features enabled, but MINIX-PC users will
have to disable one or two feature sets because otherwise elvis 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 flag to the
'CFLAGS=' line. After you do that, you must recompile elvis completely
by saying
make clean
make
-DM_SYSV
This flag causes elvis to use System-V ioctl() calls for controlling
your terminal; normally it uses v7/BSD/MINIX ioctl() calls.
-DDATE
The symbol DATE should be defined to look like a string constant,
giving the date when elvis was compiled. This date is reported by
the ':version' command.
You can also leave DATE undefined, in which case ':version' will not
report the compilation date.
-DCRUNCH
This flag causes several large often-used macros to be replaced by
equivalent functions. This saves about 4K of space in the '.text'
segment, and it does not cost you any features.
-DDEBUG
This adds many internal consistency checks and the ':debug' and
':validate' commands. It increases the size of 'text' by about 5K
bytes.
-DNO_CHARATTR
This permanenently disables the 'charattr' option. It reduces the
size of '.text' by about 850 bytes.
-DNO_RECYCLE
Normally, elvis will recycle space in the temporary file which
contains totally obsolete text. The -DNO_RECYCLE option disables
this, making your '.text' 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.
-DNO_SENTENCE
This leaves out the '(' and ')' visual commands, and removes the code
that allows the '[[', ']]', '{', and '}' commands to recognize nroff
macros. The '[[' and ']]' commands will still move to the start of
the previous/next C function source code, though, and '{' and '}'
will move to the previous/next blank line. This saves about 650
bytes from the '.text' segment.
-DNO_CHARSEARCH
This leaves out the visual commands which locate a given character in
the current line: 'f', 't', 'F', 'T', ';', and ','. This saves about
900 bytes.
-DNO_EXTENSIONS
This leaves out the ':mkexrc' command, and the 'K' and '#' visual
commands. Other extensions are either inherent in the design of
elvis, or are too tiny to be worth removing. This saves about 500
bytes.
-DNO_MAGIC
This permanently disables the 'magic' option, so that most meta-
characters in a regular expression are not recognized. This saves
about 3K bytes from the '.text' segment.
Termcap Elvis can use standard termcap entries, but it also recognizes
and uses several extra capabilities, if you give them. All of these are
optional.
Capability Description
: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
Author
Elvis was written by Steve Kirkendall. He can be reached by email
at: kirkenda@cs.pdx.edu for comments regarding elvis.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -