This file has many hypertext links. Use them! If you're using elvis 2.1i-beta 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.1i-beta 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
".
Elvis 2.1 will be distributed under the terms of the Perl "Artistic License." I didn't want to use GPL because it is far too strict. For a while I considered distributing elvis under the user's choice of either the old elvis license or GPL... but then I decided the Artistic License comes pretty close to what I really intended, and it seems wise to use a well-established license rather than make up my own. The lib/license file describes the Artistic License.
Other than that, there are some new features (mostly to fill gaps which had become annoying) and a lot of little bug fixes. Specifically...
:s
command.
As a bonus, it can now complete ex command names, option names, option values, and tag names. You can even make tag name completion work while editing your own source files (see the "inputtab" option). And for file name completion, elvis can optionally omit binary files (see the "completebinary" option) and when listing multiple matches it will skip the directory portion of each file name.
Sadly, all of this makes name completion so big that I decided to leave it out of the MS-DOS version (#undef FEATURE_COMPLETE in config.h).
:s
command now supports the 'c' flag!
There were a lot of little bug fixes I wanted to make in the substitution
code (mostly for the benefit of the :&
and :~
commands) but it seemed silly to fix the old code when I knew I'd have to
rewrite it soon anyway to support 'c'.
So I added the 'c' flag first, and then fixed the bugs.
Regular expressions have been extended with Perl-style tokens for
common character classes:
\d
for digit,
\s
for whitespace,
\w
for alphanumeric (including '_'), and
\p
for any printable character...
Plus uppercase versions which match any character not in those classes.
You can also use most of the C escapes, such as
\r
for carriage-return, and
\0
for nul,
either in a regular expression or in replacement text for the
:s
command.
Also, there were some bugs in way that elvis combined file names when given a URL. These have been fixed.
Name lookup should be faster now. When you look up the name of a system many times in a row (which is typical) elvis will only perform the name look up the first time; after that, it just remembers it. This should make navigating a set of HTML files, or the directory tree of an FTP site, much faster.
In the "man" display mode, the \^ escape is accepted as a zero-width string. It also handles .TS, .TE, and .HP macros, more or less.
A fatal bug in the "tex" display mode has been fixed. Previously, an attempt to use :tag would cause a core dump.
The version of ctags distributed with elvis has been extended to generate "ln" attributes. Also, there was a bug in the MS-DOS and Windows versions which prevented it from finding most tags; this has been fixed.
:message
outputs a normal message,
:warning
outputs a warning message, and
:error
outputs an error message.
Also, :error
has the side-effect of cancelling any
pending aliases or macros.
There is also a new :try
command.
It executes an ex command line, and then sets the then/else flag to
indicate whether the command succeeded or not.
Either way, the :try
command itself succeeds.
This is useful for adding error control to scripts and aliases.
!1
for the first
argument, and !*
for all of them) has been extended.
You can now place a backslash after the !
to have elvis insert
backslashes before any characters which would be treated specially inside
a regular expression.
Also, you can place a default value inside parentheses after the !
(e.g., !(first arg)1
) which elvis will use if that argument is missing or empty.
When :alias
is invoked with no arguments to generate
a list of aliases, the list will now be sorted by ASCII order; previously
they were listed in the order in which they were defined.
The built-in calculator now has an alias()
function which
tests for the existence of a given alias.
I'm including some sample aliases in the lib/exalias.eg file.
\a
in strings and chars.
The isnumber()
function allows a decimal point
(but everything after the decimal point is ignored).
The change to isnumber()
was made mostly so that error messages
of the form "file:line.column: message" could be recognized.
The "configure" script now supports a --verbose
flag,
which causes it to explain any decisions that it makes.
You can now directly edit a cut buffer, via a command such as
:("a)split
to edit the "a cut buffer.
This is particularly handy when the cut buffer contains a macro that needs
some work.
Also, the content type (character, line, or rectangle) used to be stored
on the first line of the buffer, but now it is stored in a new option named
"putstyle".
Fixed a fatal bug which could cause elvis to hang or dump core in some circumstances. This one was nasty!
Fixed a minor bug in the "x11" user interface, which caused the text area to shrink (show fewer columns or lines) when the font size was changed. Also, there is a new "borderwidth" option for adjusting the number of blank pixels around the edge of the text area.
The tiny "alias.c" program is now compiled to produce vi.exe, ex.exe, and view.exe for DOS, Win32, and OS/2. Previously DOS and OS/2 had separate versions of this, and Win32 didn't have it at all.
Lots of other fixes. If you're curious, take a look in the "BUGS" file.
Since elvis doesn't have to conserve memory quite so much, most of the features that had to be disabled in previous versions are now enabled. Also, the default block size has been increased from 512 bytes to 1024 bytes; this should make elvis run faster.
[:alpha:]
which appear
inside [...]
metacharacters.
Also, there were problems parsing a / character that appeared as part of
a character list inside [...]
metacharacters. That's fixed now
too.
In a related problem, if two configure events for different sizes happened to be in the message queue, then would try to adjust to the first configure event and and force the window to its miscalculated size before handling the second queued configure event. This resulted in an endless loop in which elvis cycled between two or more different window sizes. Fixing the miscalculation described in the previous paragraph reduced the chance that two configure events could be queued, but it didn't eliminate the chance. Consequently, elvis will now try to detect multiple configure events and ignore all but the last. This should solve the problem. It also has the unfortunate side-effect that if you manually resize the window rapidly then elvis may wait a while before responding.
The XGetInputFocus() function is now assumed to return a void value. In previous versions of X it returned a success indicator; elvis was testing that value, but it didn't really need to and the test was interfering with X on some platforms.
Modifiers on non-US keyboards weren't working correctly. I took a stab at fixing this one, but since I don't have a non-US keyboard I can't really tell if it works. (What's the German phrase for "Cross your fingers"?) Anyway, it still works great for US keyboards, so apparently I didn't break anything.
In osunix/osnet.c, the function netread() tried to return -1 to indicate an error. It should return False.
Problems remained with terminals that support dim text but not bright text (the md/me/mh termcap attributes). Hopefully this is now fixed.
The "configure" script has been patched to support FreeBSD.
The backslash changes for aliases seemed to break backslash handling for commands like...
g/foo/a\ one\ two... which suddenly started adding an extra blank line. This is now fixed.
In ex mode if you hit The "tags" option needs to support a notation for "look in the directory
of the current file". Elvis now allows you to say "./tags" to denote that.
After a <L command, elvis gave the message "15 lines NULLed". Now it will
correctly say "15 lines <ed".
Added a dummy "redraw" option.
Improved the entry in "elvis.syn" that describes HTML highlighting. Now
it includes all tags in HTML 3.2, and most of the parameters as well.
When the "number" option is set, clicking the mouse would set the
preferred column to the wrong value; if you clicked and then hit j/k,
the cursor jumped to a different column. This is fixed.
A crash was reported in the "tex" display mode. I suspect this was caused
by overflow when elvis encountered a very long token. I have now gone through
that code and ensured that elvis always detects token buffer overflow and
handles it gracefully.
The hacked ctags program couldn't quite handle derived classes:
"class foo: public bar {...}" should
generate an entry for "foo" and ignore "bar".
I've managed to fix this particular bug, but others remain.
Due to memory constraints, the DOS version is missing some features.
Notes have been added to the manual where necessary to warn DOS users when
features about to be discussed are unavailable to them.
The online manual title said "elvis 2.0" -- I changed to "2.1".
I fixed a reference to "14.x" which should actually read "16.x".
The "Tips" chapter of the manual has a new section that discusses
how to make elvis run faster.
I added a paragraph to the manual describing how to embed ']' and '-'
characters in a character list in a regular expression.
Added a pushpin to the dialog's icon. Dialog fields can be declared to be of type "locked". The labels of the dialog's [Submit] and [Cancel] buttons can be changed via some new options named "submit" and "cancel"; the default values of those options are drawn from the "elvis.msg" file.
Added a "-mono" command-line flag.
The "windows" user interface is now described in the online manual. In WinElvis, the names of some options have changed, in order to avoid clashes with X11 option names (which shared the same names, although they have different meanings). Specifically, "normalfont" was changed to "normalstyle", "boldfont" to "boldstyle", and so on.
WinElvis now supports -Gquit, so you can print elvis' files using lptype=windows.
The text-mode version now allows you to resize the console buffer by giving the command ":set ttyrows=... ttycolumns=...". Text-mode elvis can now read from external programs again (":r !cmd").
:ta
command, you can now quote special characters
by preceeding them with a backslash. The tag search code has been extended
to support unsorted tags files, if "!_TAG_FILE_SORTED 0" appears near the
start of the tags file.
There are also new "tagprg" and "tagprgonce" options, for running
an external tag search program. With suitable wrappers, this allows
you to use CSCOPE or Shigio Yamaguchi's GLOBAL program for tags.
The default behavior of "ctags" has changed. If you invoke it without any flags, it assumes it should use the "-s -t -v -h" flags.
:help :alias
" for more info.
Also there are now :while/:do commands, and the { ... } notation for
grouping commands can now be nested.
:w >>foo
" wasn't setting the alternate file name correctly.
The ":set
" command didn't permit trailing spaces after the last name=value clause.
Macros couldn't be undone in a single step; now they can.
Under MS-DOS, elvis was writing each output character twice, and
mouse selections didn't look right when using ANSI.SYS.
The saveregexp option wasn't saving the replacement text.
Long cursor movements didn't always center the cursor correctly.
Large ":copy
" commands didn't work right.
The syntax-coloring mode's keyword table was too small to handle PERL.
The Linux console version didn't save the shell prompt's screen colors.
Also, WinElvis' "Options->Save" menu item will now add a "!" to the :mkexrc
command line, so it can overwrite any existing elvis.rc
file.
You can use actual words to start comments, such as "rem" in DOS batch files. You can make comments appear in any font, not just the one defined by the commentfont option. You can configure multiple keywords for starting comments.
Also, the syntax mode now allows you to restrict certain keywords to
a particular column, via an "anchor" line in the description. For example,
if your elvis.syn file contains the line "anchor 1 BEGIN END
" then
the BEGIN and END words will only be keywords if they appear at the start
of a line.
You can now attach configurable dialog windows to any toolbar button. The dialogs allow you to edit some options before the toolbar's ex command is run.
By the way, the combined FTP/HTTP network access adds only about 8k bytes to the executable. If you want to reuse the code for your own project, grab url.c, http.c, ftp.c, os*/osnet.c, and parts of elvis.h, elvisio.h and opsys.h.
Most of the changes merely affect the internal organization of the interface, with the intent of making it easier to add new features such as a menubar in the future. However, some of the changes are detectable now:
left right none
} to control this.
set
"
command.
I implemented this partly just to see how hard it would be. It took less than one day, and added maybe 4k bytes of code! It was worth the effort.
I added a new section to the "Tips" chapter of the online manual, describing elvis' Web facilities. Basically, it boils down to:
:e http://www.cs.vu.nl/~tmgil/vi.html...will load the Vi Lovers' Home Page.
The "locked" option is totally separate from the "readonly" option.
normal
and syntax
display modes, it causes
each page to include a header which shows the file name, page number, and
date/time that the printout was created.
It shares a lot of code with the html display mode. Consequently, it only increases the size of elvis by about 3k bytes!
bufdisplay
mode, and one other mode.
Previously, that other mode was always normal,
but now it will use the syntax mode whenever appropriate.
For example, if you're editing an HTML file, then ^Wd will toggle between the html and syntax html display modes.
matchchar=()[]{}
which makes % act like it always has.
You might want to try matchchar=()[]{}<>\"\"
though.
Also, in the "syntax" display mode, the % command can match #if/#else/#endif preprocessor directives. The cursor must be on or before the '#' character for this to work.
:bb
[rowser
][!
] command has been added.
It constructs an HTML document listing all of the edit buffers, with
hypertext links to each of them so you can select a buffer just by
double-clicking it.
Normally :bb
lists the user buffers, but :bb!
(with a !)
lists all buffers including elvis' internal ones.
ctags
program has been extended slightly. If invoked
with -h
it will add some extra hints to the tags file
which should help elvis guess which overloaded tag you're
probably trying to find. This is not the ultimate
ctags program; this is just a quick hack to allow elvis' new
tags features to be put to the test.
tags
file to be sorted; this helps
elvis search faster. The ctags
program has been
modified so that it will now sort the tags on all operating
systems. (Previously, the tags weren't sorted under DOS or
Win32.)
:tag
command has been extended to allow
you to restrict tags which have a specific hint, or to tweak
the remembered hints that elvis uses to sort the matching tags.
:br
[owse
] command which builds an
HTML document listing selected tags from the tags file, with
hypertext links which take you to the definition points in your
source code.
.----------------------------.----------------------------------. | Resource name | Option, default | |----------------------------|----------------------------------| | elvis.toolbar | toolbar, yes | | elvis.font | normalfont, fixed | | elvis.geometry | geometry, 80x34 | | elvis.foreground | (normal foreground), black | | elvis.background | (normal background), white | | elvis.dblclicktime | dblclicktime, 4 | | elvis.control.font | controlfont, variable | | elvis.cursor.foreground | (cursor foreground), red | | elvis.cursor.selected | (cursor background), red | | elvis.cursor.blinktime | blinktime, 3 | | elvis.scrollbar.foreground | (scrollbar foreground), gray75 | | elvis.scrollbar.background | (scrollbar background), gray60 | | elvis.scrollbar.width | scrollbarwidth, 14 | | elvis.scrollbar.repeat | scrollbartime, 3 | ^----------------------------^----------------------------------^In each case, if your .exrc file sets the option or color, then the value from the resources database is ignored. All times are given in units of 0.1 second.
:on[ly]
and ^Wo commands have been added.
They close all windows except the current one.
:buffer
is given a buffer name as an argument, it will now
cause the current window to switch to the named buffer.
(Previously, :buffer
name would simply rename the current
buffer.)
:(foo.c)%p
) or number
(:(1)%p
).
Also, anywhere that elvis is expecting a filename, elvis will replace
"#
n" with the filename of the buffer whose
bufid=n.
You can use :buffer
(with no arguments) to list all user buffers'
names and bufid values.
untar
program can now restore
timestamps and permissions of the files that it extracts.
These features are enabled when untar.c is compiled with _POSIX_SOURCE defined.
Note: The untar
program isn't really part of the elvis
package.
The Win32 graphical interface was written by Serge Pirotte. If you wish to report a bug which exists only in the graphical Win32 version of elvis, then write to him. You can also thank him, if you feel so motivated. (Other bugs should still be reported to Steve Kirkendall.)
I intend to add a true extension language to elvis someday, but it won't be in 2.1. 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.
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 <LeftClick> 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.1i-msdos.tar.gz
, and untarw32.exe
to unpack
elvis-2.1i-win32.tar.gz
.
untaros2,
run it with no arguments.
elvis-2.1i-os2.tar.gz
file, above.