Permalink
Newer
Older
100644 828 lines (664 sloc) 31.7 KB
2
<title>README.html file for Elvis 2.2</title>
3
<meta name="description" content="Quick intro to Elvis 2.2, with links to source code and binaries">
4
<meta name="keywords" content="vi, elvis, unix, linux, msdos, win32, windows95 windowsNT, nt, os2, os/2, editor, source">
5
</head><body>
6
7
<center>
8
<h1>Quick intro to Elvis 2.2, with links to source code and binaries</h1>
9
</center>
10
11
<strong>CONTENTS</strong>
13
<li><a HREF="#thisfile">1. About this file</a>
14
<li><a HREF="#vi">2. Differences between vi and Elvis 2.2</a>
15
<li><a HREF="#new">3. Differences between 2.1 and 2.2</a>
16
<ul>
17
<li><a HREF="#NewEx">3.1 New EX commands</a>
18
<li><a HREF="#NewVi">3.2 New VI commands</a>
19
<li><a HREF="#NewOptions">3.3 New options</a>
20
<li><a HREF="#OldOptions">3.4 Changed or removed options</a>
21
</ul>
22
<li><a HREF="#v221">4. Differences between 2.2.0 and 2.2.1</a>
23
<li><a HREF="#links">5. Links to related files</a>
25
<pre graphic>
26
.---------------------------------------------------------------.
27
| <strong>This is not Elvis' user manual!</strong> The <em>real</em> documentation for |
28
| Elvis is located in its online help facility. While running |
29
| Elvis, enter the command "<code>:help</code>" to see the table of contents.|
30
^---------------------------------------------------------------^</pre>
32
<h1><a NAME="thisfile">1. About this file</a></h1>
33
34
This file is written in the HTML markup language.
35
You can view it with any WWW viewer, such as Netscape.
36
You can also use Elvis 2.2 to view it; this version of Elvis
37
has the ability to view HTML documents, and print them.
38
39
<p>If Elvis 2.2 doesn't automatically start up in HTML mode when you
40
view this file, then you'll need to force it into HTML mode by
41
giving the command "<code>:display html</code>".
42
43
<h1><a name="vi">2. Differences between vi and Elvis 2.2</a></h1>
44
Elvis is a superset of vi.
45
It runs on more operating systems than vi,
46
it is free,
47
and you can obtain the source code.
48
Elvis also has many new features.
49
These new features are described in the first chapter of the online manual,
50
which hypertext links to the other parts of the manual where those features
51
are described in detail.
52
Here's a just brief list:
53
54
<p>
55
<ul>
57
<li>Multiple edit buffers, so you can edit several files at once.
58
<li>Multiple windows, so you can see multiple edit buffers, or different
59
parts of the same edit buffer.
60
<li>Multiple user interfaces, including graphical interfaces under
61
Windows95/98/NT and X11.
62
<li>A variety of display modes, including syntax coloring and HTML.
63
<li>Online help, with hypertext links.
64
<li>Enhanced tags, to support overloading in C++.
65
<li>Network support, so you can load/save files via FTP, or even use Elvis as a light-weight Web browser.
66
<li>Aliases, which allow you to define new ex commands.
67
<li>Built-in calculator
71
<p>For a more complete list, with links to detailed descriptions, check the
72
online manual.
73
You can bring up the online manual by starting Elvis and giving the command
74
"<code>:help</code>".
75
The list of extensions appears after the table of contents and a brief
76
introduction.
77
78
<h1><a name="new">3. Differences between 2.1 and 2.2</a></h1>
80
The following is a summary of changes made since the release of Elvis 2.1.
81
These are in addition to any bug fixes.
83
<h2><a name="NewEx">3.1 New EX commands</a></h2>
86
<dt>:alias, :unalias
87
<dd>Create, list, alter, or remove aliases.
88
Aliases are new ex commands that you create from a sequence of other ex commands.
90
<dt>:autocmd, :augroup
91
<dd>Create, list, alter, or remove autocmds.
92
Autocmds are ex command lines that are executed automatically on certain
93
events, such as loading a file.
95
<dt>:check, :words, :wordfile
96
<dd>These configure the built-in spell checker.
98
<dt>:color
99
<dd>Not really new, but radically changed.
100
The new version is much more powerful.
102
<dt>:fold, :unfold
103
<dd>These define folds, and either close or open them.
104
Folds give you a way to hide parts of your text without actually deleting it.
105
There is a <strong>:foldc</strong> alias which folds C source pretty well.
107
<dt>:for, :do
108
<dd>This loops over a list of file names, or other values.
110
<dt>:local
111
<dd>Used within a script or alias, this creates a local copy of an option
112
so the alias can use it for storing temporary values, without clobbering
113
the value that the option had before.
115
<dt>:map
116
<dd>Not new, but significantly changed.
117
You can now use keywords to control when and how the map is applied.
119
<dt>:nohlsearch
120
<dd>Temporarily removes the highlighting for the <em>hlsearch</em> option.
121
Then next time you search, the highlighting will return.
122
123
<dt>:normal
124
<dd>When invoked with arguments, Elvis will interpret the arguments as
125
vi commands.
127
<dt>:only
128
<dd>Closes all windows except this one.
129
130
<dt>:preserve
131
<dd>Exit Elvis, but don't delete the session file.
132
133
<dt>:push
134
<dd>This is similar to <strong>:e</strong>, except that <strong>:push</strong>
135
saves the cursor's original location on the tag stack, so you can return
136
via <strong>:pop</strong> or <kbd>^]</kbd>.
137
<dt>:region, :unregion, :chgregion
138
<dd>These create, remove, or change highlighted regions.
139
The text itself is unchanged.
140
Generally you would use :region to highlight text that has changed,
141
or is significant for some other reason.
142
143
<dt>:safely
144
<dd>Run an ex command line with the <em>security</em> option temporarily
145
increased to "safer".
146
This replaces the <strong>:safer</strong> command which ran a script.
147
You can achieve the same effect via "<code>:safely source</code> <var>script</var>".
148
<dt>:switch, :case, :default
149
<dd>The usual "switch" control structure.
150
This is useful in scripts and aliases.
154
<h2><a name="NewVi">3.1 New VI commands</a></h2>
157
<dt>^I (&lt;Tab&gt;)
158
<dd>For "html" mode, this moves forward to the next hypertext link.
159
For "normal" and "syntax", it toggles folding of the current line.
161
<dt>g^I (g&lt;Tab&gt;)
162
<dd>Move backward to the preceding hypertext link.
164
<dt>g^V (g&lt;C-V&gt;)
165
<dd>If a rectangle is selected, go to the other corner in the same line.
167
<dt>g$
168
<dd>Move to the end of the current row, taking line wrap into account.
170
<dt>g%
171
<dd>If any text is selected, go to the other end.
173
<dt>g0
174
<dd>Move to the start of the current row, taking line wrap into account.
176
<dt>g=<var>key</var>
177
<dd>Operator.
178
Replace old text with an equal number of <var>key</var> characters.
180
<dt>gD, gd
181
<dd>Go to global or local definition of the word at the cursor.
183
<dt>gI
184
<dd>Input at start of line, before indent.
186
<dt>gJ
187
<dd>Join lines without adding whitespace
189
<dt>gS
190
<dd>Move to the end of a spell checker word.
191
The spell checker's definition of a word differs from the rest of Elvis
192
in that spell checker words may contain an apostrophe, provided there are
193
letters on both sides of the apostrophe.
195
<dt>gU
196
<dd>Operator.
197
Converts text to all uppercase.
199
<dt>g^
200
<dd>Move to start of current row, after indent, talking line wrap into account.
202
<dt>gh, gl
203
<dd>Move left or right one character, skipping over hidden characters.
204
This is handy when viewing text in a markup display mode, since it moves
205
over the markups effortlessly.
207
<dt>gj, gk
208
<dd>Move down or up one row, taking line wrap into account.
210
<dt>gs
211
<dd>Move to the next misspelled word.
212
If given a count, then before moving it tries to fix the current misspelled
213
word using one of the listed alternatives.
215
<dt>gu
216
<dd>Operator.
217
Converts text to all lowercase.
219
<dt>g~
220
<dd>Operator.
221
Toggles text between uppercase and lowercase.
225
<h2><a name="NewOptions">3.3 New Options</a></h2>
227
<dt>antialias, aasqueeze
228
<dd>For "x11" only, the <strong>antialias</strong> option controls whether
229
Elvis will use the Xft library to draw antialiased text.
230
Antialiased fonts tend to leave a much larger gap between lines, so the
231
<strong>aasqueeze</strong> option gives you a way to reduce that gap, and
232
get more lines on the screen.
233
234
<dt>auevent, aufilename, and auforce
235
<dd>These options are only defined during an autocmd event.
236
They describe the event.
237
238
<dt>background
239
<dd>When Elvis doesn't know the background color (which can only happen when
240
using a text-based user interface such as "termcap"), it may use this option
241
to help it choose a contrasting foreground color.
242
243
<dt>bb
244
<dd>This is a buffer option with no built-in purpose. You can use it to
245
store attributes about the buffer, for use by your own maps and aliases.
246
247
<dt>binary
248
<dd>This is set to indicate that Elvis was invoked with a "-b" flag.
249
The default <code>Elvis.brf</code> uses this to set the <strong>readeol</strong>
250
option to "binary" when appropriate.
251
252
<dt>blinktime
253
<dd>For "x11", this controls the cursor's blink rate.
254
Setting it to 0 will disable blinking.
255
256
<dt>cleantext
257
<dd>Controls when Elvis erases old text.
258
Its value is a comma-delimited set of keywords, which may include
259
"short", "long", "bs", "input", and/or "ex".
260
261
<dt>eventerrors, eventignore
262
<dd>These affect the handling of autocmd events.
263
264
<dt>filenamerules
265
<dd>This controls the way file names are parsed and manipulated by Elvis.
266
It's value is a comma-delimited list of keywords, which may include
267
"dollar", "paren", "space", "special", "tilde", and "wildcard".
268
Windows users may want to remove the "space" keyword, which will prevent
269
Elvis from parsing spaces as name delimiters; this will make it easier to
270
enter names with spaces in them.
271
272
<dt>folding
273
<dd>This is a window option.
274
It controls whether folding is active in that window.
275
276
<dt>guidewidth
277
<dd>This is a buffer option, which draws thin vertical lines between columns
278
of text.
279
Its value is a comma-delimited list of column widths, similar to the
280
<strong>tabstop</strong> and <strong>shiftwidth</strong> options.
281
282
<dt>hllayers, hlobject
283
<dd>These two options work together to give you a way to highlight text objects
284
around the cursor.
285
For example, you can highlight the current line via
286
"<code>:set hllayers=1 hlobject=al</code>".
287
288
<dt>hlsearch
289
<dd>This highlights all instances of text that matches the most recent search.
290
291
<dt>iconimage
292
<dd>This chooses an icon to be used for Elvis' windows.
293
294
<dt>includepath
295
<dd>In "syntax" display mode, clicking on a #include file will search for
296
that file in the includepath.
297
298
<dt>incsearch
299
<dd>Causes searches to be incremental.
300
This means that every time you hit a key while entering the
301
search regular expression, Elvis will search on the partial expression
302
entered so far.
303
304
<dt>listchars
305
<dd>Controls the appearance of special characters in <strong>list</strong> mode.
306
You can also use it to define arrows to mark long lines when side-scrolling
307
is active (i.e., the <strong>wrap</strong> option is off).
308
309
<dt>lpcontrast
310
<dd>For color printing, this enforces a minimum contrast by darkening
311
light colors.
312
313
<dt>lpoptions
314
<dd>For the "ps" and "ps2" <strong>lptype</strong>s, this can be set to
315
a variety of values to tweak the output.
316
See "<code>:help set lpoptions</code>".
317
318
<dt>magicchar, magicname, magicperl
319
<dd>These control the parsing of regular expressions.
320
321
<dt>prefersyntax
322
<dd>You can set the <strong>prefersyntax</strong> option to one of
323
"never", "writable", "local", or "always" to control when Elvis should
324
start displaying a file in the "syntax" display modes rather than one of
325
the markup display modes such as "html".
326
For example, after "<code>:set prefersyntax=writable</code>", whenever you edit
327
an HTML file that is writable Elvis will start in "syntax html" mode,
328
but readonly files (including anything read via the HTTP protocol) will still
329
start in "html" display mode.
330
331
<dt>scrollbgimage
332
<dd>Elvis can use background images in the "windows" and "x11" user interfaces.
333
This option controls whether the background image should scroll when the
334
text scrolls.
335
336
<dt>scrollwheelspeed
337
<dd>For wheel mice, this controls the number of lines scrolled for each
338
detent of the wheel.
339
340
<dt>security
341
<dd>This can be set to "normal" for no protection, "safer" to protect you
342
from malicious writing by a trojan horse, or "restricted" to protect the
343
system from malicious reading by you.
344
345
<dt>smartargs
346
<dd>This uses the "tags" file to find the arguments for functions.
347
When you're in "syntax" display mode and type in a function named followed
348
by a '(', Elvis looks up that function name and inserts the formal parameters
349
after the cursor.
350
You can then overtype the formal parameters with the actual parameters.
351
352
<dt>spell, spellautoload, spelldict, and spellsuffix
353
<dd>These control Elvis' built-in spell checker.
354
355
<dt>ttyitalic, ttyunderline
356
<dd>These can be used to disable certain attributes on terminals that
357
don't support them very well.
358
In particular, the text mode on color VGA screens don't show underlining by
359
converting the background to red; this may interfere with your own choice
360
for a background color.
361
362
<dt>tweaksection
363
<dd>This relaxes the definition of a "section" so that the <code>[[</code>
364
and <code>]]</code> commands will work well even if you aren't in the habit
365
of putting your outer { characters in the first column of a line.
366
367
<dt>ww
368
<dd>This is a window option with no built-in purpose. You can use it to
369
store attributes about the window, for use by your own maps and aliases.
370
371
<dt>xencoding
372
<dd>The "x11" interface now allows you to specify fonts as "fontname*size",
373
like the "windows" interface.
374
When using this notation, Elvis will use the value of <strong>xencoding</strong>
375
as the last to elements of the font's long name.
376
A typical value is "iso8859-1" to load Latin-1 fonts.
380
<h2><a name="OldOptions">3.4 Changed or removed options</a></h2>
381
<dl>
382
<dt>commentfont, stringfont, prepfont, keywordfont, functionfont, otherfont,
383
and variablefont
384
<dd>
385
The syntax display mode previously used these options
386
to control the appearance of different parts of the language.
387
Those options are no longer necessary since the <code>:color</code> command can
388
directly assign attributes to text faces named "comment", "string", etc.
389
Consequently, those options have been deleted.
390
391
<dt>boldstyle, emphasizedstyle, fixedstyle, italicstype, normalstyle,
392
and underlinedstyle
393
<dd>Similarly, the "windows" interface used these options
394
to control the attributes of fonts.
395
The have been deleted, since <code>:color</code> does this now.
396
397
<dt>underline
398
<dd>The "x11" interface used to have an "underline" option to control the
399
attributes of the "underline" font.
400
This has been deleted.
401
402
<dt>normalfont
403
<dd>The "x11" interface's <strong>normalfont</strong> has been renamed to
404
"<em>font</em>", to be more similar to the "windows" interface.
405
406
<dt>lppaper
407
<dd>The <strong>lppaper</strong> option has been replaced by a more versatile
408
<em>lpoptions</em> option.
409
410
<dt>showname, showcmd, showstack and showtag
411
<dd>These options have all been replaced by a single <em>show</em> option.
412
413
<dt>safer
414
<dd>The <strong>safer</strong> option has been replaced by a <em>security</em>
415
option, which can be set to "normal", "safer", or "restricted".
416
417
<dt>tabstop, shiftwidth
418
<dd>These options have been improved.
419
You can now set the value to a comma-delimited list of column widths.
420
421
</dl>
423
<h1><a name="v221">4. Differences between 2.2.1 and 2.2.0</h1>
424
Elvis 2.2.1 is mostly a bug-fix update of 2.2.0.
425
A few new feature crept in though.
426
427
<h2>4.1 Fixed bugs</h2>
428
<dl>
429
430
<dt>:andale was using Luxi Mono fonts
431
<dd>The <code>:andale</code> alias (used in the "x11" user interface)
432
was actually using Luxi Mono fonts instead of Andale fonts.
433
434
<dt>filenamerules broke newline handling
435
<dd>When I implemented the filenamerules option in 2.2.0, I accidentally
436
broke the way it parses newlines.
437
This is important if you remove the <strong>spaces</strong> keyword from
438
filenamerules, and then do something like
439
"<code>:n `grep foo *.txt`</code>"
440
to sets the args list to all files containing "foo".
441
442
<dt>HTTP User-agent: header line
443
<dd>When sending HTTP requests, Elvis should send a User-agent: header line.
444
Some web sites demand this.
445
446
<dt>Default button names
447
<dd>In the "html" display mode, the &lt;input type=submit&gt; and
448
&lt;input type=reset&gt; tags should have the default values "Submit" and
449
"Reset" respectively.
450
In 2.2.0, they have no default.
451
452
<dt>&lt;hr/&gt; shows ------------&gt;
453
<dd>The "html" display mode had trouble with tags that end with "/&gt;".
454
Elvis would display the &gt; on the screen instead of hiding it.
455
456
<dt>&lt;Esc&gt;
457
<dd>The &lt;Esc&gt; key should beep when pressed in visual command mode.
458
459
<dt>Delayed screen updates in "x11" user interface
460
<dd>When a map times out, Elvis wasn't updating the screens immediately
461
in the "x11" user interface, which made it hard to detect that the map
462
had indeed timed out.
463
464
<dt>"d)" could crash
465
<dd>In a file full of blank lines, "d)" caused 2.2.0 to dump core.
466
467
<dt>:put from a cut buffer
468
<dd>The <code>:put<code> command wasn't accepting a cut buffer name argument.
469
470
<dt>:dict didn't handle single words
471
<dd>The <code>:dict</code> alias (after ":load dict") didn't handle single-word
472
queries correctly.
473
474
<dt>The directory editor's links were relative to the wrong directory.
475
<dd>If you used "<code>:e dirname</code>" to edit the directory "dirname",
476
then the links in the generated HTML weren't interpreted as being relative
477
to "dirname". They were treated as being relative to the current directory.
478
479
<dt>"x11" converts &lt;b&gt; to ^K0062.
480
<dd>The "x11" user interface is too aggressive when trying to convert key names
481
from angle-bracket notation to raw characters.
482
If a map contains an HTML tag such as &lt;b&gt;, and the tag name happens to match
483
the name of a key such as the "b" key, then Elvis was trying to convert that
484
keystroke into a raw control sequence.
485
486
<dt>":normal cwFOO^[" didn't work
487
<dd>The c operator was implemented in a way that didn't work in the
488
<code>:normal</code> command.
489
490
<dt>".IP \(bu 4" had too large of an indent.
491
<dd>This is apparently due to the fact that "4" has no explicit scaling suffix,
492
and .IP was using the wrong default scaling factor.
493
494
<dt>Hard to enter ^ in WinElvis on a Norwegian keyboard
495
<dd>WinElvis has always had a hard time with "dead keys", but now I'm hopeful
496
that it should work. The ^ key works in Norway now, at least.
497
498
<dt>":e +cmd file" didn't work
499
<dd>For the <code>:e</code> command and a few others, the "+" flag could only
500
handle a line number parameter, not a full ex command line.
501
502
<dt>Typos in manual.
503
<dd>Many found and fixed.
504
Still many more to be found, I'm sure.
505
506
<dt>:chregion always changes the comment
507
<dd>The :chregion shouldn't change the comment of an existing region unless
508
you give a new comment explicitly, or the old comment was merely the old
509
font name.
510
511
<dt>":set show=spell" doesn't work very well.
512
<dd>You need to load the whole dictionary to get good suggestions from the
513
spell checker.
514
In 2.2.0 you had to turn on the "spellautoload" option, but in 2.2.1 that
515
option is on by default.
516
517
<dt>:map doesn't list all user-defined maps.
518
<dd>2.2.0 assumed that any map tied to a symbolic key was defined by the
519
system, so it wouldn't list it unless you said "<code>:map all</code>".
520
This means you couldn't see actions mapped to function keys.
521
2.2.1 is smarter about this -- it adds a flag to indicate whether the
522
map was added by the user or created automatically by the GUI.
523
524
<dt>Command names were truncated in error messages.
525
<dd>When displaying a "bad command name" error message, 2.2.0 would truncate
526
the name at the first character that prevented it from being recognized as
527
a command.
528
2.2.1 displays the full name of the bad command, exactly as you typed it.
529
530
<dt>:man doesn't display backslashes correctly
531
<dd>The <code>:man</code> alias didn't handle backslashes very well,
532
so pages which use a lot of backslashes such as ":man groff_man" looked bad.
533
534
<dt>:%unr doesn't always remove all regions.
535
<dd>This mostly occured when running autocmds.
536
It also affected the <code>:chregion</code> command.
537
538
<dt>:%j only joined two lines
539
<dd>The command "<code>:1,%j</code>" joins all lines but "<code>:%j</code>"
540
only joined two.
541
542
<dt>elvis.ini maps too much
543
<dd>The default "elvis.ini" file contained maps without the
544
<strong>nosave</strong> flag, so if you ran <code>:mkexrc</code> in an xterm,
545
your ~/.elvisrc file would contain maps that are present in all user interfaces
546
and for all termcap terminal types.
547
548
<dt>:mkexrc can lose GUI-specific options
549
<dd>The <code>:mkexrc</code> command only saved GUI-specific options for the
550
current GUI.
551
This means that running <code>:mkexrc</code> in the "termcap" interface could
552
clobber your default font for the "x11" interface.
553
2.2.1 gets around this by storing all GUI-specific options, even those for
554
other GUIs or unknown GUIs, just so it can save them in the ~/.elvisrc file.
555
556
<dt>&lt;li&gt;&lt;p&gt; looks ugly
557
<dd>Many HTML documents use this sequence of tags to generate lists that have
558
a bit of vertical whitespace between items.
559
But 2.2.0 was drawing the list item marker (bullet or number) on the blank
560
line, instead of the line where the paragraph's text starts.
561
2.2.1 treats this as a special case -- it ignores the &lt;p&gt; in this context.
562
563
<dt>security=safer is too strict
564
<dd>The "security=safer" setting didn't allow some command that it should
565
have allowed.
566
This prevented some harmless and useful commands such as "elvis -client foo"
567
from working.
568
To get this working right, I had to overhaul the behavior of "security=safer".
569
It is no longer a more lenient superset of "security=restricted".
570
See ":help set security" for details.
571
572
<p>One consequence of this is that the "-S" flag now sets security=restricted.
573
574
<dt>:wq didn't work when security=safer or security=restricted.
575
<dd>The manual said it should.
576
The new version of security=safer doesn't allow any writing, but you can
577
now <code>:wq</code> when security=restricted.
578
579
<dt>The "ax" text object didn't support tag names with hyphens
580
<dd>I've extended it to allow single hyphens but not double hyphens
581
(since double hyphens mark comments).
582
It also allows colons, for namespace control.
583
584
<dt>dirperm(".") returns readonly
585
<dd>The <code>dirperm()</code> function didn't recognize directories
586
correctly.
587
This was a bug in the way the "dir:" pseudo-protocol was implemented.
588
589
<dt>hlobject didn't allow commas
590
<dd>An increasing number of options in elvis store multiple values in
591
comma-delimited lists.
592
The "hlobject" option can store multiple values, but required them to
593
be either crammed together or delimited by spaces.
594
Now it supports commas.
595
596
<dt>rcssince didn't work
597
<dd>The rcssince alias (part of ":load since") is supposed to be executed
598
when a buffer is loaded, but it used some commands which are illegal during
599
initialization.
600
Most of the commands that are illegal during initialization are only
601
illegal because they're useless until the first file is loaded into a buffer.
602
The rcssince alias was actually running after the file was loaded, so it
603
should be allowed, but Elvis had a rather weak idea of when "initialization"
604
ends.
605
606
<dt>:suspend didn't work
607
<dd>It wasn't in Elvis' internal command list correctly.
608
The <code>:stop</code> equivalent has always worked though.
609
610
<dt>Backslashes aren't handled right in "simpler syntax"
611
<dd>If a "simpler syntax" expression started with \( or \$ then Elvis
612
should convert that to a literal ( or $ character.
613
Instead, 2.2.0 was leaving it as a literal \ followed by an parenthesized
614
subexpression, or $ variable substitution.
615
(This arose from trying to make an initial \\ remain unchanged so Windows
616
users could five UNC names such as \\machine\dir\file.)
617
618
<dt>AliasLeave events
619
<dd>At the end of an alias, 2.2.0 generated an AliasEnter event when it
620
should have generated an AliasLeave event.
621
622
<dt>:eval does not compute
623
<dd>The :eval command could get confused if the command that it runs
624
needs to evaluate an expression.
625
This was because a static buffer is used to return the results of evaluations,
626
and :eval didn't copy the result into a local buffer before trying to execute
627
it.
628
629
<dt>Trouble with gzipped files
630
<dd>The "<code>:load gzip</code>" command (formerly "<code>:load augz</code>")
631
sets up elvis to automatically handle gzipped files.
632
It has some problems, but the two biggest problems are now fixed.
633
<p>One problem was that filtering commands always wrote out the final newline
634
to gunzip, even though that newline wasn't part of the gzipped data.
635
This caused gunzip to output an error message.
636
2.2.1 doesn't write out the final newline when the "partiallastline" option
637
is set.
638
<p>The other main problem was that the file was initially displayed in hex
639
mode, even after the file had been gunzipped into text.
640
To get around this, elvis will now temporarily remove ".gz" from the end of
641
the file name, then rerun the "elvis.arf" script, and then slap the ".gz"
642
back on the file name again so the file can be saved correctly.
643
644
<dt>"x11" could generate a BadMatch error while exiting
645
<dd>This would occur if you start Elvis from an xterm,
646
and then exited the xterm before Elvis.
647
Elvis will now ignore that particular error.
648
649
</dl>
650
651
<h2>4.2 New features</h2>
652
<dl>
653
654
<dt>:nofold
655
<dd>Wipes out folds. This differs from <code>:unfold</code> in that
656
<code>:unfold</code> leaves some information behind to allow the region to
657
be easily refolded. <code>:nofold</code> leaves nothing behind.
658
659
<dt>Persistent information
660
<dd>Elvis can store cursor positions and some other things between invocations.
661
See the "persistfile" and "persist" options.
662
663
<dt>%&lt; and #&lt; in filenames
664
<dd>When giving file name arguments, you can use %&lt; and #&lt; to get the name of
665
the current or alternate file, with its extension removed.
666
For example, if you're editing "database_interface.c", then you can get to
667
"database_interface.h" by typing "<code>:e %&lt;.h</code>".
668
669
<dt>:phelp command
670
<dd>Like <code>:help</code> except that <code>:phelp</code> doesn't split
671
the screen.
672
Instead, it saves your old cursor position on the tag stack and then shows
673
the help page in your current screen.
674
675
<dt>X11 buttons can simulate keystrokes
676
<dd>The <code>:gui</code> command accepts a new notation for defining toolbar
677
buttons that simulate keystrokes instead of invoking an ex command.
678
This is useful when you want to do something with a character selection;
679
ex commands treat all selections as line selections.
680
681
<p>The notation uses square brackets around the name.
682
You can put the characters to simulate after the closing square bracket.
683
If you omit those characters, then Elvis will simulate keystrokes that
684
spell out the button name, with the brackets included.
685
You can then set up a <code>:map</code> to convert that to something else.
686
That can be nice because elvis allows maps to be somewhat context sensitive.
687
688
<dt>Computed line addresses
689
<dd>In ex command lines, you can now use
690
<code>=</code><var>option</var> to pull a line address from an option, or
691
<code>=(</code><var>expression</var><code>)</code> for more complex expressions.
692
This is often handy in aliases.
693
694
<dt>GDB interface
695
<dd>The core of a simple GDB interface is provided,
696
to allow Elvis and GDB to work together.
697
This depends on Elvis' "x11" user interface; you can't use it with the termcap
698
interface.
699
It is implemented partly as a C program that acts as a "wrapper" around GDB
700
and parses its output for things that Elvis needs to know, and partly as a
701
set of aliases which receive that information and act on it (e.g., by moving
702
the cursor, or changing the highlight of breakpoint lines).
703
704
<dt>Generic "state" display
705
<dd>A new "state" option has been created.
706
If the "show" option contains the keyword "state", then the value of the
707
"state" option will be displayed at the bottom of the window.
708
This can be handy in complex alias packages.
709
The GDB interface uses it to indicate the debugged program's status.
710
711
<dt>More function keys
712
<dd>The &lt;F11&gt; and &lt;F12&gt; function keys are now supported on most
713
platforms.
714
I also tried to support shift and control function keys, with some success
715
on Linux.
716
717
<dt>:map noselect ...
718
<dd>The :map command now supports a <strong>noselect</strong> flag.
719
This is short for "every context except select".
720
721
<dt>:load scripts described
722
<dd>I've added a section to the "Tips" chapter describing the scripts
723
in Elvis' library.
724
(These may be loaded via the <code>:load</code> alias.)
725
726
<dt>:source can read from a program
727
<dd>The :source command has been extended to allow it to read the output of
728
a program, and interpret that output as a series of ex commands.
729
For example, you could create a program that scans an HTML document and
730
outputs a series of <code>:fold</code> commands to allow you to selective
731
hide sections of it.
732
733
<dt>incsearch partially supports history
734
<dd>When using incremental search, the final search expression is stored
735
in the search history.
736
You can use arrow keys or ^Ok and ^Oj to retrieve a previous search.
737
Full editing is still only supported for non-incremental searches, though.
738
739
<dt>herefile script
740
<dd>After "<code>:load herefile</code>", Elvis should be able to highlight
741
"herefiles" in shell scripts.
742
Herefiles are text files embedded within the script itself, between
743
<code>&lt;&lt;</code><var>SYMBOL</var> and a line containing just
744
<var>SYMBOL</var>.
745
746
</dl>
747
748
<h1><a name="links">5. Links to related files</a></h1>
750
The main download site is
751
<a href="ftp://ftp.cs.pdx.edu/pub/elvis/">ftp.cs.pdx.edu</a>.
752
The files can also be found at Elvis' home page,
753
<a href="http://elvis.vi-editor.org/">http://elvis.vi-editor.org/</a>
754
755
<p>Most of the following are binary files, not text or HTML files,
756
so you can't view then with your Web browser.
757
But you can use your browser to download the files.
758
For Netscape, use &lt;Shift-Click&gt;;
759
for MSIE, use &lt;RightClick&gt; and "download".
763
<dt><a href="/pub/elvis/untar.c">untar.c</a>
764
<dd>This is the complete source code for "untar",
765
a little program which extracts files from a gzipped tar archive.
766
Comments near the top of "untar.c" describe how to compile and use it.
767
If you already have the gzip and tar utilities, then you don't need this.
768
769
<dt><a href="ftp://ftp.cs.pdx.edu/pub/elvis/untardos.exe">untardos.exe</a>
770
<dd>This is an MS-DOS executable, produced from the above "untar.c" file.
771
It can also be run under Windows 3.1, in a Dos-prompt window.
772
For brief instructions on how to use <code>untardos,</code>
773
run it with no arguments.
774
775
<dt><a href="ftp://ftp.cs.pdx.edu/pub/elvis/untarw32.exe">untarw32.exe</a>
776
<dd>This is a Win32 executable, produced from the above "untar.c" file.
777
It runs under WindowsNT and Windows95.
778
It runs somewhat faster than the MS-DOS version.
779
It also supports long file names.
780
For brief instructions on how to use <code>untarw32,</code>
781
run it with no arguments, in a text-mode window.
782
783
<p><strong>NOTE:</strong>
784
MS-Windows95 and MS-DOS use incompatible methods for mapping long file names
785
to short ones.
786
So if you extract the files using <code>untarw32.exe</code>,
787
DOS programs won't be able to find them with their expected names,
788
and vice versa.
789
Consequently, you must use <code>untardos.exe</code> to unpack
790
<code>elvis-2.2_1-msdos.tar.gz</code>, and <code>untarw32.exe</code> to unpack
791
<code>elvis-2.2_1-win32.tar.gz</code>.
792
(Actually, I recently added a <strong>-m</strong> flag which forces
793
<code>untarw32.exe</code> to convert long file names to short ones using
794
the MS-DOS method.)
795
796
<dt><a href="ftp://ftp.cs.pdx.edu/pub/elvis/untaros2.exe">untaros2.exe</a>
797
<dd>This is an OS/2 executable, produced from the above "untar.c" file.
798
For brief instructions on how to use <code>untaros2,</code>
799
run it with no arguments.
800
801
<dt><a href="elvis-2.2_1.tar.gz">elvis-2.2_1.tar.gz</a>
802
<dd>This is a gzipped tar archive of the source code and documentation for
803
Elvis 2.2 and its related programs.
805
<dt><a href="elvis-2.2_1-msdos.tar.gz">elvis-2.2_1-msdos.tar.gz</a>
806
<dd>This archive contains the documentation and MS-DOS executables
809
<dt><a href="elvis-2.2_1-win32.tar.gz">elvis-2.2_1-win32.tar.gz</a>
810
<dd>This archive contains the documentation and Win32 executables
812
These were compiled and tested under Windows95, but should work under
813
WindowsNT 3.51 (or later) as well.
814
815
<dt><a href="elvis-2.2_1-os2.tar.gz">elvis-2.2_1-os2.tar.gz</a>
816
<dd>This archive contains the documentation and OS/2 executables
817
for Elvis 2.2.
818
<strong>If this link is broken then look in Herbert's site, below.</strong>
821
<a href="http://www.fh-wedel.de/pub/fh-wedel/staff/di/elvis/00-index.html">
822
http://www.fh-wedel.de/pub/fh-wedel/staff/di/elvis/00-index.html</a>
823
<dd>This is where the OS/2 maintainer stores his most up-to-date versions.
824
It may be better than the <code>elvis-2.2_1-os2.tar.gz</code> file, above.
827
</body></html>