.---------------------------------------------------------------.
| This is not elvis' user manual! The real documentation for |
| elvis is located in its online help facility. While running |
| elvis, enter the command ":help
" to see the table of contents.|
^---------------------------------------------------------------^
This file has many hypertext links. Use them! If you're using elvis 2.2 to browse this file, then hypertextual references will appear as underlined text. (Except on color PCs; since color video cards don't support underlining, hypertextual references will be colored -- white on red, by default.) To follow the hypertext link, move the cursor onto the underlined text and press (Enter). To go back, press (Control-T). The (Tab) key moves the cursor forward to the next hypertext reference.
If elvis 2.2 doesn't automatically start up in HTML mode when you view this file,
then you'll need to force it into HTML mode by giving the command
":display html
".
For a more complete list, with links to detailed descriptions, check the
online manual.
You can bring up the online manual by starting elvis and giving the command
":help
".
The list of extensions appears after the table of contents and a brief
introduction.
:color
command has been rewritten.
The new version is much more powerful, and it should be more intuitive.
Instead of assigning colors to a small number of fonts as in previous
versions of elvis,
the new :color
command assigns colors and font attributes to
be used for a large variety of specialized text faces.
:color
command is...
:color [gui.]face [like face] [bold] [italic] [underlined]... where the items in brackets are optional, bold text is literal, and italic names represent variable text. The [gui.]face must be the first argument of the command, but the other arguments can appear in any order.
[boxed] [graphic] [fixed|proportional] [color] [on color]
As a special case, giving the :color
command without any
arguments will list the current color settings.
Invoking :color
with just a face argument will
list the setting of that text face.
The meanings of the arguments are as follows:
:mkexrc
command can build a .exrc
file which works correctly on all GUIs.
For example, it might have "color termcap.normal yellow on blue" and
"color x11.normal black on linen".
:color
command.
The normal text face is the most important.
It is the only text face used in the "normal" display mode,
for the current window.
Also, any other text face which for which a color or attribute has not been
explicitly set will inherit that color or attribute from the
normal
text face.
This inheritance happens when the screen is drawn, so any time you change
the normal background color, the default background for all other text faces
also changes.
The idle text face is another special one.
What normal
does for the current window, idle
does
for all other windows.
This means that if you give normal
and idle
different background colors, then the current window will always be
highlighted.
The default setting of idle
is "color idle like normal" which avoids
that behavior.
Some other text faces are lnum for the line numbers displayed
by :set number
,
hexheading for column headings in "hex" mode,
hexcursor for the hexadecimal version of the current
character in "hex" mode,
and header for the page headers when printing in "normal"
or "syntax" display mode.
The "syntax" display mode will eventually be rewritten to allow users to specify faces in the "elvis.syn" file, but for now the following face names are hardcoded: comment, string, char, regexp, keyword, function, variable, other, number, prep for preprocessor directives, and prepquote for text in angle brackets in an #include directive.
The markup display modes ("html", "man", and "tex") have not been modified to take advantage of the new color scheme yet, so there are no face names for them. This is a shame, really, because they could really benefit from the new attribute combination rules. That was a big influence in the design of the new color code.
normal
or idle
face.
The like face notation allows you to define an
additional face for them to inherit from.
For example, you could say "color char like string" to make character literals
look like string literals; after that, any change to the "string" face would
also automatically change the "char" face too.
normal
or some other face).
The boxed attribute is new; it draws a box around the text in the "x11" and "windows" GUIs. This is intended to draw boxes around individual words, not whole paragraphs. It is ignored by the "termcap" interface. When printing, the PostScript print drivers draw boxes around the text, and most other print drivers print a gray background instead of a box.
lptype=ps
or lptype=ps2
) they select
one of two different fonts.
The fonts are configurable in the lib/elvis.ps
file;
by default fixed text is printed using a Courier font,
while proportional is printed using a Times font.
Printing with a proportional font is a bit quirky though. Elvis' text formatting always assumes fixed-pitch fonts are used, so to keep mixtures of fonts looking good, the PostScript printer driver adjusts the width of each chunk of proportional text to match the width it would have had in a fixed-pitch font. For long segments of proportional text you probably won't notice this, but when an individual word is printed in a proportional font it may be stretched noticibly.
normal
or some other face.
The list of supported color names for each GUI is unchanged. Any color names supported by previous versions of elvis should still be supported. See the "User interface" section of the manual for details.
The "windows" interface now allows any number of different colors to be used, via X11' "#rrggbb" notation. Previously, only a single foreground color plus a single background color could be set this way.
The "termcap" interface is smart enough to leave colors unchanged if you never explicitly set any foreground and/or background colors. For example, if before starting elvis you set your terminal's background color to blue, and your :color settings only affect the foreground, then the termcap interface will never explicitly change the background color so it should remain blue. (This assumes that the ANSI "^[[0m" escape sequence won't turn off the color.)
:color
command can
directly assign attributes to text faces named "comment", etc.
Consequently, those options have been deleted.
Similarly, the "windows" interface used to have options named boldstyle, emphasizedstyle, fixedstyle, italicstype, normalstyle, and underlinedstyle to control the attributes of fonts. The "x11" interface used to have an "underline" option. Those options have been eliminated, although the Options->Gui... menu item and its dialog remain. The dialog now issues :color commands instead of :set commands.
However, the "termcap" interface retains its ttyunderline option. That is still necessary because it helps the "termcap" interface avoid problems that occur when underlining and background colors are both used on CGA/EGA/VGA video cards.
When changing the normal
background color of the "windows"
GUI window, there are some areas around the outside of the text which aren't
redrawn in the new color.
If the window is resized, or PAINTed, they're redrawn with the new color,
but I can't seem to make that happen automatically.
Serge, please check my code at guiwin32/guiwin.c, line 1088, and see if you
can figure out what I'm doing wrong.
I've modified the dialog associated with the Options->Gui... menu item., but it still needs work. In particular, it should be able to set the foreground and background colors, but I haven't been able to get the combo boxes to work correctly yet.
There is at least one screen glitch in the boxed
text:
If you delete the last character fromáboxed text, the right edge of the
box is not redrawn.
I haven't attempted to convert the "vio" user interface. Herbert, that'll have to be your job. The arguments to the (*gui->draw)() and (*gui->color)() functions have changed, and there are two new functions inserted after (*gui->color)() named (*gui->freecolor)() and (*gui->setbg)().
The new function pointers, (*gui->freecolor)() and (*gui->setbg)(), can both be NULL for vio. The vio version of (*gui->color)() will probably be almost identical to the termcap version. The only function that might cause you grief is (*gui->draw)().
This is a global option, but it is only effective while you're in the syntax display mode, because the definitions of "function name" and "open parenthesis" may vary with on your programming language.
Currently the tag search is performed via the ref
program,
but this may change in the future.
Adding the search code into elvis should make it faster, and also gives the
search mechanism access to elvis' tag heuristics.
In expressions, "feature("smartargs")
" will return True if
your version of elvis which supports the smartargs feature, and False otherwise.
The smartargs option itself always exists in elvis 2.2, even if its behavior
isn't supported.
timestamp
option.
Its value is a string, which will normally be set via the new
time function.
Elvis doesn't use it for anything internally, but the elvis.arf
and elvis.awf
functions have been modified to set it, and
elvis.bwf
has been modified to test it.
elvis.bwf
or
elvis.awf
.
It indicates whether the "!" flag was used in a ":w
" command.
This is important because elvis.bwf
is responsible for
detecting changes in the file's timestamp, and we want to be able to override
that by adding the "!".
ignorecase
to be disregarded if the regular
expression contains uppercase letters.
autoselect
option.)
The instances will remain highlighted until you give a :nohlsearch
command.
:if
, :let
, and others.
current(
regexp)
feature, described below.
current()
function has previously supported, you can now pass it a regular expression.
This can be either a string which starts with a / character, or a
literal regular expression as described above.
The return value will be the matching text. To find this text, elvis starts searching from the beginning of the line, for all non-overlapping instances of text which match the regular expression. When it finds a match which includes the cursor position, it returns that match. If there is no such match, then an empty string is returned.
For example, current(/./)
returns the current character, and
current(/\S*/)
returns the current whitespace-delimited word
(or an empty string if the cursor happens to be on whitespace).
Here's a subtle one: current(/..../)
divides the line into
4-character chunks and returns the chunk containing the cursor, or "" if the
cursor is located after the last complete chunk.
Using strings instead of literal regular expressions,
current("/.")
would return the current character, exactly like
current(/./)
.
In fact, the current() function can't tell the difference between them,
because of the way that regular expressions are parsed.
This is the first function to have a side-effect. I'm not sure I like that.
Here's an example showing how this might be used.
alias man { "Display a man page in a new window local b report=0 nosaveregexp let b = newbuffer() (=b) set bufdisplay=man (=b)r !!man !* try (=b)1 s/^Reformatting.*ait\.\.\.$// try (=b)% s/\\/\\\\/g try (=b)% s/_\(.\)/\\fI\1\\fR/g try (=b)% s/.\(.\)/\\fB\1\\fR/g try (=b)% s/\\fR\\fB//g try (=b)% s/\\fR\\fI//g (=b)1 i .nf (=b) set nomod (=b) split }
To implement this, I added a dirtime()
function to all of the
osXXXX/osdir.c files.
[
face [
attributes]]
[
+line]
[
file]
:edit
command, except that
:push
saves the cursor position on the tag stack.
:howto scroll wheel
".
This is particularly important for WinElvis, since whole lines are selected by dragging the mouse in a narrow strip along the left edge of the window. Previously, this was very difficult to do if the "number" option was turned on. Now it should be easier.
ref
program has been modified to append elvis' elvispath
onto the end of the normal tag path.
This was done mostly to provide a clean way for ref
to act as
a reference to the standard C library.
Elvis' lib directory now contains an "ansistub.c" file and a "tags" file
derived from it.
You can now obtain information about a standard C library function by running
"ref
function", or by moving the cursor onto the function
name in an edit buffer and hitting Ctrl-K.
It also works well with the new smartargs option.
This feature was added because using :eval
to evaluate buffer
names was cumbersome since the parentheses have special meaning in both
expressions and ex addresses, and also because :eval
affects
parentheses and backslashes throughout the line, not just in the buffer name.
The following example demonstrates the two techniques, deleting any backspace
sequences in the buffer whose name is stored in option x.
Clearly, the ":(=x)
" version is smaller and easier to understand.
:eval \((x)\)%s/.\\b\\\(.\\\)/\\1/g :(=x)%s/.\b\(.\)/\1/g
elvis -Gquit -c "set lptype=html lpcolor||lp! foo.html" foo.c... so the "quit" interface must support colors.
All GUIs now support the "#RRGGBB" notation for colors. When used with the termcap/open/script/quit user interfaces, the requested color is rounded to the nearest available color.
:color
commands can begin with "+=" or "-="
to alter existing attributes instead of completely replacing them.
For example, ":color comment += bold" adds the bold attribute to comments
without losing any other comment attributes, and ":color comment -= italic"
removes the italic attribute.
The "windows" GUI now supports colors named "gray1" through "gray99".
Previously, "-b blksize" was used to select the block size used in elvis' session file. This has been changed to "-B blksize". I decided to use "-b" for binary files because users rarely bother to change the block size, and because vim uses "-b" for binary files. I want to avoid unnecessary incompatibilities.
lpout="-"
will cause the printer output to be sent
to stdout.
This can be handy when elvis is used noninteractively to format files...
elvis -Gquit -c "set lptype=bs lpout=-|lp" ref.man | more
There is a new "ansi" printer type, which outputs xterm escape sequences
for changing attributes.
This adds maybe 200 bytes to elvis.
It works well in conjunction with the lpout="-"
thing,
described above.
Text object names are two characters long. The first character is 'a' to include whitespace or delimiters surrounding the object, or 'i' for just the object itself. The second character identifies the type of object; it can be one of the following:
.---------.----------------------------------------------------. | 2nd char| Description of the text object | |---------|----------------------------------------------------| | w | word or punctuation string, like b e w commands | | W | whitespace-delimited word, like B E W commands | | s | sentence, like ( ) commands | | p | paragraph, like { } commands | | S | section, like [[ ]] commands | | { [ ( < | block, delimited by the previous char & its match | | } ] ) > | block, delimited by the following char & its match | | b | parenthesis block, like a( or i( | | B | brace block, like a{ or i{ | | % | block, delimited by (, [, or { on left & its match | | L | block, delimited by varying levels of indentation | | l | line | | other | field, delimited at both ends by the character | ^---------^----------------------------------------------------^
The use of uppercase S for sections, % for any brace-delimited block, L for indentation-delimited block, l for lines, and other punctuation for field delimiters are all extensions beyond vim's text objects.
For block and field text objects, the 'a' version includes the delimiting characters, while the 'i' version excludes them. For the other text objects, the 'a' version includes trailing whitespace (or leading whitespace if there is no trailing whitespace), and the 'i' version is just the object itself without the surrounding whitespace.
Text objects accept counts.
For blocks, the count is the number of levels of embedded brackets to
skip.
For other text objects, the count is the number of consecutive objects
to use, starting with the current one.
For example, "3daw
" deletes three words,
while "3da{
" moves out three level of braces, and then deletes
that single large brace-delimited block.
Although Vim allows text objects to be used as the first command while visually selecting text (e.g, "vas" selects a sentence), elvis does not support this.
By default, hlobject=al
so it will highlight lines.
Setting hllayers=1
will cause the current line to be highlighted.
Another popular choice is hlobject=a{ hllayers=9
to highlight
up to nine layers of nested blocks.
Each layer can be highlighted differently. The outermost highlighted layer is always highlighted using a font named "hlobject1", the next layer uses "hlobject2", and so on. If hllayers is set higher than the number of hlobjectn fonts, then elvis will loop back to the hlobject1 again when it runs out of defined fonts.
:help fold
".
Briefly...
:fold
creates a new folded region, or refolds an unfolded one.
:unfold
creates a new unfolded region, or unfolds a folded one.
:color fold ...
" to control its display attributes.
fold()
and unfold()
,
test whether the current line is currently folded or previously folded.
:foldc
alias folds the bodies of C functions.
To play with this, start editing a C source file and give the command
":foldc
".
The body of each function should be reduced to a single line.
To unfold one, move the cursor onto the folded line and hit the
<Tab> key.
To fold it again, hit the <Tab> key a second time.
/
and ?
vi commands to search incrementally as you type in the regular expression,
instead of waiting for you to hit <Enter> before searching.
To maintain compatibility with vim, the abbreviated name of "incsearch" is "is". The "initialstate" option used to have that abbreviated name; I had to change it to "init" to avoid a name clash.
:normal
command.
It allows ex scripts to execute vi commands.
There are some differences between elvis' implementation and vim's:
:normal!
). Elvis' version never interprets maps. In effect,
elvis acts as though it always had a "!" modifier.
For the sake of compatibility with earlier versions of elvis,
when :normal
is invoked without any arguments it will set
the display mode to "normal", just as it always has.
tabstop
and shiftwidth
options can now be set
to a comma-delimited list of column widths, instead of merely a single column
width.
The last width is repeated, if necessary for long lines.
In addition, a new guidewidth
option uses the same type of
width list to specify where vertical lines should be drawn on the screen.
This is sometimes handy when you're editing text with a specific format,
such as a dump of database records.
:for
(or, equivalently, :foreach
)
command has been added.
Like the :while
command, it supplies parameters which control
a subsequent :do
command.
The first parameter of :for
is the name of a looping variable,
which can be any option.
The remaining parameters (after an optional "in" keyword) is a list of
values that the variable to take, for each iteration of the loop.
To help generate the list of values, a new "..." operator has been added to the built-in calculator so you can do things like this:
:for i (1 ... 10) :do set i?
alias readMAILTO { "initialize a mailto: message "Normally, URLs are considered to be readonly and binary, "but since the whole purpose of the mailto: URL is to "write text out to the mailer, we need to change that. se noro reol=text "Read the .signature file, if there is one. if exists($HOME/".signature") then { read ~/.signature 1 i -- } } alias writeMAILTO { "send a mailto: message " This is a lot more complex that one would think. " The mail program forks off a spooler, and the spooler " inherits the stdout/stderr file descriptors. This " has the unfortunate side-effect of making elvis wait " until the mail queue is emptied, after this message " and any other pending messages have been uploaded to " the mailserver. Yuk! To avoid that, we redirect the " mail program's stdout/stderr to /dev/null. w !!mail -s"!(no subject)subject=" !2 >/dev/null 2>&1 se nomod }
:s
command wasn't always returning a failure status
when it should.
This caused some scripts to misbehave.
current()
could cause core dumps or other weirdness. Fixed.
:make
command wasn't writing buffers even if
autowrite
option was set.
:vi +line
" was ignoring the line number when
no filename was given.
showlink
option had the side-effect of making the current
word be displayed on the bottom line in modes other than HTML.
:browse
and :sbrowse
commands, and the
:kwic
alias, were broken.
incsearch
option in that situation;
it'll use plain old searching instead.
hlobject
option has been changed
from "al" to nothing.
This disables object highlighting, even if hllayers
is set to
a non-zero value.
The "elvis.syn" file now allows language descriptions to contain "set"
lines.
These set the default value of options (i.e., they only change the value if
you haven't explicitly set that option via a :set command).
The idea here is that you can add language-specific lines such as "set hlobject=a{
" to elvis.syn, and then you don't need to worry about setting
hlobject in your own initialization scripts.
elvis -fn courier*14
" or
":set controlfont=times*14
".
The "windows" user interface also supports this notation.
Some new option flags have been added. Invoking "elvfmt -c" will cause it to be smarter about crowns -- i.e., if the second line of a paragraph typically has different indentation than the first line, this flag causes "elvfmt" to read ahead, if necessary, to discover what a wrapped line's indentation should look like.
A new "-i charlist" flag allows you to specify characters other than whitespace, which should be included in the indentation. For example, "-i'>'" allows the > character to be used in indentation; this is handy when adjusting email messages with quoted text.
Two shorthand options have been added. "-C" is good for C/C++ comments, and is equivalent to "-c -i'/*'". "-M" is good for email messages, and is equivalent to "-i'>'".
:help
command has been extended slightly.
In addition to all the previous help topics that it supported, you can
also now lookup a display mode via ":help display
name".
You can also look up an HTML tag via
":help <
name>
".
However, please bear in mind that elvis' manual describes elvis' implementation
of HTML tags, which might not be quite how a real browser uses them.
Also, some common tags such as <center> aren't supported by elvis,
so they aren't described in the manual.
Still, it is better than nothing.
When looking up an option via ":help set
option",
you can now append a "=" character after the option name if you like.
This is handy because name completion (the Tab key) adds an "="
after the names of non-Boolean options. Previously you had to backspace
over the "=", but now you can leave it.
The "ex" and "options" chapters have been reformatted for improved readability and consistency.
A new font named "hlspell" is used to highlight misspelled words. New options named "hlspell", "showspell", "spelltags", "spelldict", "spellautoload", and "spellsuffix" influence the spell checker. A new ":check" command lets you define the spell check rules for each type of text. New ":words" and ":wordfile" commands manipulate the spelling dictionary. In visual command mode, ^K moves the cursor forward to the next misspelled word. The built-in calculator has been extended with "spell()" and "spelltag()" functions, which attempt to guess the correct spelling of a word.
The ^K command may be replaced by a g S command by the time elvis 2.2 is officially released.
:let
command, to alter part of an option's value.
:let a="this is a subscripting example" :calc a[3 4] a subscripting :let a[3 4] = "an indexing" :calc a this is an indexing example
By default, subscripting uses whitespace to delimit the elements, but you can also specify a different delimiter, or divide the string into individual characters.
The &&
and ||
operators have been modified.
They return their left argument if it is false or true, respectively;
otherwise, they return their right argument.
This is more powerful than simply returning a Boolean value.
For example, you can use ||
to offer a default value for an
expression.
:alias say calc "!$" || "What should I say?" :say What should I say? :say hello hello
The :
operator (when not part of a ?:
operator)
has been defined as appending its arguments with an OS-specific path delimiter
between them.
That's ":" for Unix/Linux, and ";" for Microsoft OSes.
:mkexrc
command has been refined.
It should be easier to save your configuration now.
Basically, a new "mkexrcfile" option has been created, which stores the
name of a file which was previously generated via :mkexrc
.
If you later invoke :mkexrc
without any arguments, elvis
will overwrite that same file, without complaining that the file already
exists.
Two new options have been created to help control whether HTML documents
are initially displayed in the "html" mode or "syntax html" mode.
Each buffer has an "initialsyntax
" option which indicates
whether that particular buffer should start in "syntax" mode.
A global "prefersyntax
" option is used by the
elvis.arf
to set or clear initialsyntax
as appropriate.
Most people will want to set prefersyntax
to either "always"
or "never", but you can also set it to "local" or "writable".
\|
alternation operator is now supported.
The closure operators (*
, \+
, \?
,
and \{
m,
n}
)
can now be applied to complex subexpressions, instead of just single-character
expressions.
You can make any closure operator be "non-greedy" by placing a \?
operator after it.
There are new \h
and \H
metacharacters that
match the edge of a word, or a non-edge, respectively.
There is also a new "magicperl
" option that gives \b
and \B
the same meanings respectively.
(Normally, \b
is treated as a backspace character in regular
expressions).
A new "magicchar
" option lists the metacharacters that
don't need a preceding backslash.
You can use this to tweak the regular expression syntax to be more like
egrep or Perl.
Regular expressions now support Perl-style variable interpolation,
if you set the new "magicname
" option.
This also works in the replacement text of :s//
commands.
This means that if a regular expression contains $
name,
elvis will replace it with the value of the named option.
The following example sets "c" to a regular expression that matches C++
comments, and then uses it in a substitution that converts them to C comments.
:let c="//\\(.*\\)" :s/$c/\/*\1*\//
lptype=ps
or lptype=ps2
)
will now automatically sense the page size, and scale the printout accordingly.
The lppaper
option still exists, but you should only set it if
you want to override the automatically sensed size.
elvis.syn
file has been extended two ways.
First, a new "mostly" line has been added which allows you to specify what
color/attributes to use for words that aren't classified as keywords, functions,
or anything else.
Previously, any such word was considered to be a "variable" by default.
But since spell-checking is normally disabled for "variable" words, this
would have prevented the spell-checker from working when editing HTML source.
The "mostly" line in HTML's syntax description gets around that by making
such words be considered "formatted" instead.
The other change is also related to spell-checking. Syntax entries can now have a "documentation" line to describe the delimiters of embedded documentation. Elvis then displays the documentation using the "doc" colors and attributes. More importantly, elvis can spell-check it using the "doc" spelling rules. This is specifically intended to support Perl's POD text, and currently Perl is the only language configured to use this feature... but hopefully it'll be versatile enough to support other languages too.
You can now use text objects as part of a v/V/^V selection.
:set synccursor
"
which will cause elvis to call XSync() at appropriate times,
which seems to fix this.
:e 1
". This could clobber an existing buffer.
:customize
alias didn't work with directory names that
contain spaces.
This was often a problem under Windows.
:<<
and :>>>>
commands
weren't shifting by multiple shiftwidths as they should.
:join
command didn't work with visual selections.
:%s/\( ,\)\+//g
, due to a bug in
the way that non-greedy closure operators were added.
incsearch
" was set, backward searches could dump core.
hlsearch
" set, elvis would hang if you searched for
a regular expression that could match 0 characters.
newbuffer()
function,
:file
command, and :w
command, elvis could assign
two different buffers the same name.
This wasn't a huge problem, but it could make file recovery be a little
awkward.
.-----.-------------------------------------------------------. | g0 | go to leftmost char in current row, for wrapped lines | | g^ | go to leftmost non-whitespace in current row | | g$ | go to rightmost char in current row | | gj | go down one row | | gk | go up one row | | gd | go to local definition of word at cursor | | gD | go to global definition of word at cursor | | gI | insert at start of line, like "0i" | | gJ | join lines without space, like ":join!" | | gU | operator, makes text uppercase | | gu | operator, makes text lowercase | | g~ | operator, toggles case | | ga | show ASCII code of current char | ^-----^-------------------------------------------------------^
.-----.-------------------------------------------------------. | gh | move left, skipping hidden chars (for markup modes) | | gl | move right, skipping hidden chars | | g=X | operator, replaces text with equal number of X chars | ^-----^-------------------------------------------------------^Note that vim uses gh to start its "Select" mode, which looks like a visual selection but behaves differently. I generally try to avoid unnecessary incompatibilities with vim, but I think this is justified since it means that gh, gj, gk, and gl are just WYSIWYG versions of the h, j, k, and l commands.
:augroup
, :autocmd
, and
:doautocmd
commands have been added to elvis.
This is still extremely experimental, but you're welcome to play
with it if you want.
The commands are described in elvis' online help.
visual
", it now supports a
"noremap
" flag which prevents the rhs text from being
rescanned for maps.
command
" for visual command mode,
select
" for command mode when a visual selection is pending,
"motion
" for when a motion command or text object is expected,
"input
" for input mode or replace mode, and
history
" for input or replace while entering an ex command.
showspell
" option and the cursor
is already on a misspelled word and you pass a count parameter to gs,
it'll replace the current misspelled word with one of the suggested alternatives
before moving to the next misspelled word.
For example, 1gs will replace the current word with the first
alternative before moving to the next misspelled word.
showspell
option was suggesting words from the wrong
dictionary. Fixed.
:map select o g%
" to allow o to work
this way in elvis too.
:map select O g^V^V
" to allow O to work
this way in elvis too.
(The first ^V
is necessary to protect the second one from the
command line parser. When you're typing this interactively, you'll need to
hit <Ctrl-V> four times!)
ex/likevim.ex
script has been written to emulate
come of vim's commands that aren't natively supported in elvis.
usertime
" option.
It never needs timeouts for function keys, so the "keytime
"
option is still ignored.
:help
command is now clever enough to support
multi-keystroke vi commands, such as ^Wd and g%.
$
prefix for option names.
Also, you can use _
or $_
as a synonym for line()
.
showname
option has been renamed to showfile
.
showfile
and showtag
options will now
display "file=" or "tag=" before their value.
This was done because there are so many things that can be displayed on
the status line that it was becoming confusing.
:mkexrc
command will now save aliases.
[]
(subscript)
operator was too low.
magicchar
option was changed.
See the following "Regular Expression" section for a description of why.
locked
and readonly
options should never
be stored by :mkexrc
.
absolute()
function is now
smart enough to eliminate ".." in pathnames.
Hopefully this is enough to make most aliases for a given file all
resolve to the same exact string.
javac
compiler likes to give long relative names for files, even if the file
is in the current directory.
tweaksection
" option to control this.
:config
alias has been replaced by a similar
:feature
alias.
:mkexrc
will now avoid using the
:if
command, so that the script can be executed even if the
:if
command has been disabled by #undef'ing FEATURE_CALC.
showspell
option will now display numbers with the
suggested spellings.
This makes the gs command easier to use.
\Q
causes all characters to be handled literally except for
backslashes; i.e., all metacharacters require a backslash after \Q
.
\V
causes it to use the traditional vi syntax, regardless of
the setting of the magicchar
option.
\E
uses the normal syntax, under the control of magicchar
.
The "elvis.arf" script has been modified to use \V so it will work even
if you changed magicchar
.
Some users noticed that if they configured magicchar
to make elvis
use a Perl-ish regular expression syntax, elvis would no longer use syntax
coloring when displaying Perl scripts.
This was because "elvis.arf" uses regular expressions to recognize scripts,
and changing magicchar
broke those regular expressions.
AliasEnter
and ScriptEnter
are triggered when
an alias or script is about to be executed.
This is handy for setting local options.
There are also AliasLeave
and ScriptLeave
events,
mostly for the sake of symmetry.
Perhaps they'll be useful for tracing alias calls or something like that.
There is a new Edit
event, which is triggered each time you
modify the edit buffer.
Edit
autocmd event to
highlight any lines that you change by setting the background to red.
:color changed on red :au Edit * '[,']region changed :au BufWritePost * unregion
mapmode
option for buffers,
and extended the :map
command to support a
mode=
name context flag.
Any maps defined with a mode=
name flag will be used
only for buffers whose mapmode
is also set to
name.
For example, you can use this to set up different maps for HTML files and
man-pages, and then set each buffer's mapmode
to use the right
set of maps.
:map mode=html select BB c<strong>^P</strong>^[ :map mode=html select II c<em>^P</em>^[ :map mode=man select BB c\fB^P\fR^[ :map mode=man select II c\fI^P\fR^[
:alias!
(with a "!" suffix);
user-defined aliases use no suffix.
:mkexrc
command.
System-defined aliases aren't saved,
since they're defined in the standard initialization scripts.
:alias
displays the definition of an alias, it will now
indent to the code to indicate program structure.
!
n*
in aliases to
access all argument text from the nth word to the end of the
arguments.
For example, !2*
will be replaced by all arguments text except the
first word.
:mkexrc
command was changing the name of the "Elvis custom initialization" buffer.
Internal buffers like that should never be renamed when written.
smartargs
option didn't allow any whitespace between
the function name and the '(' character.
:let
command wasn't triggering OptChanged
autocmd events.
:help ex
" and ":help vi
" were failing to find
the help files.
:s///
" command's "x
" flag was unreliable
when used in aliases that switch buffers.
In particular, it didn't work in readXXX and writeXXX aliases used to
add new URL protocols.
guidewidth
option) were
being drawn on ex command output at the bottom of the screen.
:r
command always displayed the number of lines read,
even if report=0
.
elvtags/ctags
program was sometimes adding a bogus
"class" hint.
show=link
setting (previously the "showlink" option)
was slow in some situations.
Also, it was displaying things in "syntax" mode, which is pointless;
only the "html" display mode can have non-obvious links.
:mkexrc
command didn't save maps correctly if they used
the new "mode=XXX" flag.
ttyitalic
" option has been created to disable italics
in this situation.
color statusbar like toolbar
" -- the change wouldn't be reflected
on the screen until the statusbar had an Expose event.
current("face")
in expressions to find the name
of the text face at the cursor position.
This value is only updated when the screen is updated, which normally means
it won't change during the execution of an alias.
current("background")
to determine whether
the "normal" background is "light" or "dark".
This result is computed by examining the actual background color, not by looking
at the "background" option.
If the background color hasn't been explicitly set, then it returns "".
color()
function for examining the settings
of text faces.
color(
face)
returns the entire :color setting.
color(
face,"fg")
returns the
foreground color string.
This may be a single color name, or a list of color names delimited by the word "or".
color(
face,"bg")
returns the
background color string.
This is usually a single color name, but in the "x11" user interface it could
be a color name, an image name, or both.
color(
face,"like")
returns the
"like" face name, if this face has one.
:autocmd
command has a new BgChanged
event,
which is triggered whenever the "normal" background color changes.
color normal black on red tux.xpm
" will
load an image from "tx.xpm",
tint it red, and
use that as the background of normal text.
The image file can be located in the current directory, or
in a "themes" subdirectory of any element of elvispath
.
:theme
alias for loading whole sets of colors.
The libs directory stores scripts and image files.
When :theme
is invoked without arguments, it lists the names
of the theme scripts.
When invoked with a theme name, it loads that theme by running the script.
readTHEME
alias, which gives elvis an easy
way to download new themes.
Running ":e theme:/
" will display a list of downloadable themes.
You can them move the cursor onto one and hit <Enter> to
download, install, and load it.
:mktheme
alias to help you construct
your own themes in the download format.
show
" option.
Its value is a list of things to show at the bottom of a window.
make install
" should now create a tags
file for the stubs in the lib directory.
This will help smartargs
and <Shift-K> work with standard
library functions.
:set prefersyntax=writable
" setting
to work better.
normalfont
" option
has been changed to just "font
".
This is intended to make the "x11" interface be a little more like the
"windows" interface.
nottyunderline
will no longer disable underlining,
unless you also configure a background color.
(If you don't like this, you can say ":color normal on transparent" to disable
underlining without really changing the background color.)
smartargs
option used to be global but is now a
buffer option.
This was done mostly for the benefit of HTML, where tag parameters are
highlighted as functions, but never appear in the "tags" file -- elvis used
to spend a noticeable amount of time searching for them without finding them.
:map
command which prevented it from
listing cursor key maps and sometimes other maps as well.
I fixed that, but then decided that I liked not having the cursor maps be
listed -- they're always mapped to the same things by default, and it's nice
to avoid clutter.
I eventually decided to make ":map
" list all non-cursor key maps,
and use ":map all
" to list all maps including cursor key maps.
elvtags/ctags
program now has limited support for tagging
enum values and struct/union fields.
Windowing will be more versatile. Currently the GUI versions of elvis always split detached windows; sometimes it would be nice if they could be attached to the existing window, as a horizontal or vertical pane.
I intend to add a true extension language to elvis. The language interface will be general enough to support a variety of languages. The first language supported will probably be PERL, followed rapidly by Python and TCL.
I'm thinking of modifying the markup display modes (man, tex, and html) to store the list of supported markups, and their effects, in a separate file. That way, you could create your own markups to display nroff -ms, RTF, SGML, and MIME "rich text" documents.
I'd like to redesign the way elvis assigns buffer names. I have already modified it to use the full pathname of a file as the buffer name, so if you attempt to edit the same file as both "foo" and "./foo", elvis will use the same buffer for both. In addition, I'd like for elvis to store a "current working directory" for each window, and use that to convert a relative buffer name into the absolute pathname. A similar trick would be used for filenames. When running an external program, elvis would change the real current directory to that window's directory. The benefits of all this:
Most of the following are binary files, not text or HTML files, so you can't view then with your Web browser. But you can use your browser to download the files. For Netscape, use <Shift-Click>; for MSIE, use <RightClick> and "download".
untardos,
run it with no arguments.
untarw32,
run it with no arguments, in a text-mode window.
NOTE:
MS-Windows95 and MS-DOS use incompatible methods for mapping long file names
to short ones.
So if you extract the files under Windows95, DOS programs won't be able to
find them with their expected names, and vice versa.
Consequently, you must use untardos.exe
to unpack
elvis-2.2g-msdos.tar.gz
, and untarw32.exe
to unpack
elvis-2.2g-win32.tar.gz
.
untaros2,
run it with no arguments.
elvis-2.2g-os2.tar.gz
file, above.