5. Links to related files
+
+.---------------------------------------------------------------.
+| 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.|
+^---------------------------------------------------------------^
-
1. About this file
This file is written in the HTML markup language.
You can view it with any WWW viewer, such as Netscape.
-You can also use elvis 2.1i-beta to view it; this version of elvis
+You can also use elvis 2.1 to view it; this version of elvis
has the ability to view HTML documents, and print them.
This file has many hypertext links.
@@ -159,7 +165,7 @@
any pending macros or aliases are aborted.
:alias togglecase {
- try !% s/.*/\U&
+ try !% s/.*[a-z].*/\U&
else !% s/.*/\L&
}
@@ -176,6 +182,22 @@
}
+:switch
+
:case
+
:default
+This is a multi-way branch.
+The :switch
command evaluates an expression, and stores the
+result in an internal variable.
+Each :case
command compares the switch value to a literal string;
+if it matches then the remainder of the line is executed an an ex command.
+If none of the cases match, then :default
will run its ex command.
+
+ :switch os
+ :case unix echo LF
+ :case mac echo CR
+ :default echo CR-LF
+
+
@@ -315,8 +337,7 @@
expression.
tagprg, tp
-
tagprgonce, tpo
-These allow you to use an external program to perform tag searches.
+This allows you to use an external program to perform tag searches.
blkhit, bh
blkmiss, bm
@@ -333,7 +354,7 @@
These affect the way text is printed.
Setting lpnumber
causes line numbers to be printed, just as
number
causes line number to be shown on the screen.
-For the "normal" or "syntax" display modes, lpheader
+Setting the lpheader
option
causes pages to have a header showing the file name, page number, and date.
previousdir, pdir
@@ -341,6 +362,11 @@
You can use "~-" (tilde minus) at the start of a file name as a shorthand
for the previous directory name.
+smarttab, sta
+If set, this causes the <Tab> key to act like
+^T when in the indentation area of a line.
+Elsewhere in a line, <Tab> will act normally.
+
@@ -391,6 +417,16 @@
alias(name)
Test for the existence of a given alias.
+shell(command)
+Executes the command via a shell, and returns the text that
+the program wrote to stdout.
+
+line(buffer, line)
+Returns a single line from a buffer.
+If buffer is omitted, then the current buffer is assumed.
+If both buffer and line are omitted, then the current
+line of the current buffer is returned.
+
@@ -428,7 +464,6 @@
and "~-" for the previous directory.
Also, under Unix you can use "~user" for the home directory of
user.
-~name, ~+, ~-
Network protocols
Elvis can read via HTTP, and read or write via FTP.
@@ -468,14 +503,9 @@
-3.6 Revisions since the first 2.1 release
+3.6 Differences between 2.1_3 and the original 2.1 release
-This version of elvis is 2.1_3 (pronounced "two point one patch-level 3").
-It may also be written as 2.1.3; however, the "2.1_3" notation was chosen for a reason:
-the directory name "elvis-2.1_3" is a valid MS-DOS directory name, but
-"elvis-2.1.3" is not.
-
-Many bugs and annoyances have been fixed since the first 2.1 release
+Many bugs and annoyances have been fixed since the first 2.1 release
a couple months ago.
The highlights are:
@@ -683,6 +713,191 @@ 3.6 Revisions since the first 2.1 release
+3.7 Differences between 2.1_4 and 2.1_3
+
+This version of elvis is 2.1_4 (pronounced "two point one patch-level 4").
+It may also be written as 2.1.4;
+however, the "2.1_4" notation was chosen for a reason:
+the directory name "elvis-2.1_4" is a valid MS-DOS directory name, but
+"elvis-2.1.4" is not.
+
+This is primarily a bug-fix update.
+There are some big changes that I'd like to make to elvis, but
+they'll all have to wait until version 2.2.
+This bug-fix version is simply intended to make waiting for 2.2 a little
+easier.
+
+
Some of the main areas of bug fixes are:
+
+
+
+- Buffer bugs
+
- Several people reported that elvis complained about the '#' being used
+in initialization scripts (even though '#' doesn't appear anywhere in those
+scripts), or that sometimes a buffer would get scrambled.
+These problems have now been fixed, thanks mostly to William Plant.
+He tracked the problem down to the use of FEATURE_LITRE in scan.c.
+
+
This was a significant bug!
+The '#' thing was only one manifestation of a dangerous bug.
+Other manifestations could mangle buffers, cause core dumps, etc.
+This bug fix alone is probably enough to justify downloading 2.1_4.
+
+
- Cygwin support
+
- The Win32 version of elvis 2.1_3 (or earlier) didn't work very well
+under Cygwin's
bash
shell.
+elvis 2.1_4 should fix that. Specifically...
+
+- Cygwin sets the TERM environment variable to "cygwin",
+which elvis will now recognize as a synonym for "console".
+
- Elvis now supports the mount table produced by the Cygwin
+
mount
utility.
+
+- Windows98 chokes on vi.exe, etc.
+
- An apparent bug in recent versions of Windows causes the
+
vi.exe
, view.exe
, and ex.exe
programs
+to run in the background.
+(Those programs worked in Windows95, but choked in Windows98 and NT.)
+To work around this, I replaced the execvp() call with a spawnvp() call
+followed by an exit() call.
+It'll waste a little RAM now, but at least it works.
+
+This bug also hit Cygwin's bash
shell, when run under Windows98
+or NT.
+I've tested 2.1_4 under bash
, and it works now.
+
+
- Running external programs under Win32
+
- There were two bugs which, together, caused elvis to act weird after
+running an external command such as ":!dir".
+This was particularly acute in the text-mode version, but now both versions
+seem to work as intended.
+
+
- Screen glitch in MS-DOS with NANSI.SYS
+
- The screen wasn't always drawn correctly when using one of the better
+ANSI drivers, and setting TERM=nansi (or whatever).
+This was due to a bug in the nansi termcap entry in tinytcap.c;
+it should be fixed now.
+
+
- Scrolling after :split
+
- Previously there was a bug which showed up when you have two windows
+open on the same buffer.
+Inserting text in one window could cause the other window to scroll after
+each keystroke.
+This has been fixed.
+
+
- Name completion with spaces
+
- There were some problems when attempting filename completion on
+files whose names contain spaces.
+The bug responsible for this has been fixed.
+
+
- Ctags/elvtags
+
- Some bugs in the ctags/elvtags program have been fixed.
+Mostly these only occured when you're using long lines.
+
+
- Display modes
+
- The "tex" and "syntax" display modes should work a little better now.
+I added some TeX markups, and enhanced the "syntax" display mode to handle
+PERL slightly better.
+Also, some users have contributed syntax descriptions for new languages.
+
+
- :make
+
- The
:make
, :cc
, and :errlist
+commands were treating any alphanumeric word as a filename, without
+checking to see if it even exists.
+It was supposed to verify that the name was an existing,
+readable/writable (or just readable if noanyerror
),
+non-binary file... and now it will.
+
+ - POSIX compatibility tweaks
+
- The
:=
command, when invoked without line number, should
+display the total number of lines in the buffer. Previous versions of elvis
+didn't do that correctly, but 2.1_3 did.
+Unfortunately, that fix broke the :.=
command, which is supposed
+to display the current line number.
+Version 2.1_4 should both of those right, finally.
+
+The ^F and ^B paging commands are supposed to leave
+two lines of overlap, but previous versions of elvis have only kept one line
+of overlap.
+(NOTE: I considered adding an option to control the overlap, because if you
+have a 24-line screen and 66-line pages, then then it would be nice to leave
+1 line of overlap because three ^Fs or ^Bs would equal
+one page.
+If you believe an option would be useful, please let me know.)
+
+
The $ command accepts a count argument, and moves
+forward (count-1) lines before moving to the end.
+
+
+
+
+The only new features (since 2.1_3) are...
+
+
+- :switch/:case/:default commands
+
- Elvis now has a :switch command for doing a multi-way branch in a readable
+way.
+I believe this is justified, since the current :if/:then/:else commands would
+require you to use deeper and deeper nested braces to achieve the same effect.
+The old way:
+
+ if os=="unix"
+ then echo Unix
+ else {
+ if os=="win32"
+ then echo Windows95/98/NT/2000
+ else {
+ if os=="msdos"
+ then echo MS-DOS
+ else {
+ if os=="os2"
+ then echo OS/2
+ else echo Who?
+ }
+ }
+ }
+
+The new way:
+
+ switch os
+ case unix echo Unix
+ case win32 echo Windows95/98/NT/2000
+ case msdos echo MS-DOS
+ case os2 echo OS/2
+ default echo Who?
+
+
+ - "html" printer type
+
- Setting the
lptype
option to "html" causes the
+:lpr
command to write HTML output, instead of normal printer
+control sequences.
+This give a good way to generate WYSIWYG HTML code from any of elvis'
+display modes.
+It required minimal changes to the code, too -- basically, I just created
+a new printer type that uses "<b>" to start bold font, "<i>" to
+start italics, and so on, instead of some printer-dependent escape sequence.
+
+ - "makehtml" alias
+
- There is a new
:makehtml
alias which attempts to convert plain text to HTML.
+It works pretty well, though you'll still need to hand-edit the results in
+many cases. You might want to compare the output of :makehtml
to
+that of the "html" lptype, to see which one fits your needs better.
+
+ - "smarttab" option
+
- I added VIM's "smarttab" alias.
+When set, this causes the <Tab> key to act like ^T
+when pressed in the indentation area of a line.
+Elsewhere in the line, <Tab> is treated normally.
+Now you can do things like "
:set smarttab shiftwidth=4
"
+to change your indentation levels while leaving the tabstop
+option unchanged.
+
+The current implementation is a little half-assed though --
+you can't backspace over the indentation.
+Instead, you must hit ^D to reduce the indentation level.
+
+
+
4. The future of elvis
One of the biggest tasks on my list is to rewrite the ctags program
@@ -715,6 +930,26 @@ 4. The future of elvis
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 assigns buffer names.
+I'd like to make it always use the full pathname of a file as the buffer name.
+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 a 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:
+
+- If you're editing "foo" and "./foo", they'll both use the same buffer.
+This sounds contrived, but a similar thing happens with tag files fairly often.
+
- If you do a :cd command, then the old buffers will still write out to
+their old directories.
+
- Different windows could have different directories.
+
- The X-windows "-client" flag would behave in a more reasonable manner.
+
- The "current directory" could be something other than a local directory.
+For example, there's no reason you shouldn't be able to ":cd ftp://ftp.sunsite.unc.edu/pub/incoming".
+
+
5. Links to related files
If the main site (ftp.cs.pdx.edu) is too slow, try the mirror site at
@@ -755,29 +990,29 @@ 5. Links to related files
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.1-msdos.tar.gz
, and untarw32.exe
to unpack
-elvis-2.1-win32.tar.gz
.
+elvis-2.1_4-msdos.tar.gz
, and untarw32.exe
to unpack
+elvis-2.1_4-win32.tar.gz
.
untaros2.exe
This is an OS/2 executable, produced from the above "untar.c" file.
For brief instructions on how to use untaros2,
run it with no arguments.
-elvis-2.1_3.tar.gz
+elvis-2.1_4.tar.gz
This is a gzipped tar archive of the source code and documentation for
Elvis 2.1 and its related programs.
-elvis-2.1_3-msdos.tar.gz
+elvis-2.1_4-msdos.tar.gz
This archive contains the documentation and MS-DOS executables
for Elvis 2.1.
-elvis-2.1_3-win32.tar.gz
+elvis-2.1_4-win32.tar.gz
This archive contains the documentation and Win32 executables
for Elvis 2.1.
These were compiled and tested under Windows95, but should work under
WindowsNT 3.51 (or later) as well.
-elvis-2.1_3-os2.tar.gz
+elvis-2.1_4-os2.tar.gz
This archive contains the documentation and OS/2 executables
for Elvis 2.1.
@@ -785,7 +1020,7 @@ 5. Links to related files
ftp://ftp.fh-wedel.de/pub/fh-wedel/staff/herbert/elvis/00-index.html
This is where the OS/2 maintainer stores his most up-to-date versions.
-It may be better than the elvis-2.1-os2.tar.gz
file, above.
+It may be better than the elvis-2.1_4-os2.tar.gz
file, above.