Skip to content

Commit 2683291

Browse files
committed
Vi IMitation 1.27
1 parent c86bb8a commit 2683291

100 files changed

Lines changed: 9963 additions & 2162 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.exrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
set ai bs=2 shell=csh nojs nord ru

doc/difference.doc

Lines changed: 354 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,354 @@
1+
This is a summary of the differences between VIM and vi.
2+
3+
4+
The most interesting additions:
5+
6+
Multi level undo.
7+
'u' goes backward in time, 'ctrl-R' goes forward again. Set option
8+
'undolines' to the number of changes to be remembered (default 100). Set
9+
'undolines' to 0 for vi-compatible one level undo.
10+
11+
12+
Repeat a series of commands.
13+
'v'<c> starts recording typed characters into named buffer <c> (append to the
14+
buffer if buffer name is upper case). A subsequent 'v' stops recording. The
15+
buffer can then be executed with the '@'<c> command. This is very useful to
16+
repeat a complex action.
17+
18+
19+
Flexible insert mode.
20+
The arrow keys can be used in insert mode to move around in the file. This
21+
breaks the insert in two parts as far as undo and redo is concerned.
22+
23+
CTRL-O can be used to execute a single command-mode command. This is almost
24+
the same as hitting ESC, typing the command and hitting 'a'. For undo/redo
25+
only those inserts are remembered where something was actually inserted.
26+
27+
28+
Quoting.
29+
Quoting can be used to first choose a piece of text and then give a command
30+
to do something with it. This is an (easy to use) alternative to first giving
31+
the operator and then moving to the end of the text to be operated upon. 'q'
32+
and 'Q' are used to start quoting a piece of text. 'q' works on characters
33+
and 'Q' on lines. Move the cursor to extend the quoted part. It is shown
34+
highlighted on the screen. By typing 'o' the other end of the quoted text can
35+
be moved. The quoted text can be affected by an operator:
36+
d delete
37+
c change
38+
y yank
39+
> or < insert or delete indent
40+
! filter through external program
41+
= filter through indent
42+
: start ":" command for the quoted lines.
43+
V format text to 'textwidth' columns
44+
J join lines
45+
~ swap case
46+
u make uppercase
47+
U make lowercase
48+
49+
50+
Block operators.
51+
With quoting a rectangular block of text can be selected. Start quoting with
52+
CTRL-Q. The block can be deleted ('d'), yanked ('d') or its case can be
53+
swapped ('~'). A deleted or yanked block can be put into the text with the
54+
'p' and 'P' commands.
55+
56+
57+
Online help.
58+
':help' command and help key (F1 for MSDOS) display several pages of concise
59+
help. The name of the help file can be set with the "helpfile" option.
60+
61+
62+
Command line editing.
63+
You can insert or delete at any place in the command line using the cursor
64+
keys. The right/left cursor keys can be used to move forward/backward one
65+
character. The shifted right/left cursor keys can be used to move
66+
forward/backward one word.
67+
68+
The command lines are remembered. The up/down cursor keys can be used to
69+
recall previous command lines. The 'history' option can be set to the number
70+
of lines that will be remembered.
71+
72+
73+
Filename completion.
74+
While entering a command line (on the bottom line of the screen) <ESC> can be
75+
typed after an (incomplete) file name wildcard; the wildcard will be
76+
expanded. If there are multiple matches, CTRL-N (next) and CTRL-P (previous)
77+
will walk through the matches. CTRL-D can be typed after an (incomplete) file
78+
name wildcard; all matching files will be listed.
79+
80+
81+
Text formatting.
82+
The 'textwidth' (tw) option can be used to automatically limit the line
83+
length. This replaces the 'wrapmargin' option of Vi, which was not very
84+
useful. The 'V' operator can be used to format a piece of text ("V}" formats
85+
a paragraph).
86+
87+
88+
Command line options:
89+
90+
When Vim is started with "-v" (View) then readonly mode is used (includes
91+
"-n").
92+
93+
When Vim is started with "-s scriptfile", the characters read from
94+
"scriptfile" are treated as if you typed them. If end of file is reached
95+
before the editor exits, further characters are read from the console.
96+
97+
The "-w" option can be used to record all typed characters in a script file.
98+
This file can then be used to redo the editing, possibly on another file or
99+
after changing some commands in the script file.
100+
101+
The "-n" option disables the writing of a ".vim" file (see below).
102+
103+
The "-c command" option does the same as the the "+command" option.
104+
105+
The "-T terminal" option sets the terminal type.
106+
107+
108+
In command mode:
109+
110+
Missing command: 'Q' (go to Ex mode).
111+
Missing Ex commands: append, change, insert, open, preserve, recover,
112+
(un)abbreviate, visual, z and ~.
113+
114+
The command characters are shown in the last line of the screen. They are
115+
removed when the command is finished. If you do not want this (on a slow
116+
terminal) reset the 'showcmd' option.
117+
118+
If the 'ruler' option is set, the current cursor position is shown in the
119+
last line of the screen.
120+
121+
'u' and CTRL-R accept a count for the number of undos/redos.
122+
123+
'U' still works after having moved off of the last changed line and after
124+
'u'.
125+
126+
Nulls in the file are replaced by newlines internally. This allows editing of
127+
binary files (more or less). When searching for nulls, use a newline in the
128+
search pattern.
129+
130+
Characters with the 8th bit set are displayed. The characters between '~' and
131+
0xa0 are displayed as "~?", "~@", "~A", etc., unless the "graphic' option is
132+
set.
133+
134+
'=' is an operator to filter lines through an external command (vi: lisp
135+
stuff). The name of the command can be set with the 'equalprg' option. The
136+
default is "indent".
137+
138+
'][' goes to the next ending of a C function ('}' in column 1).
139+
'[]' goes to the previous ending of a C function ('}' in column 1).
140+
141+
'*' searches forward for the identifier under the cursor, '#' backward.
142+
'K' runs the program defined by the "keywordprg" option, with the identifier
143+
under the cursor as argument.
144+
145+
'%' can be preceded with a count. The cursor jumps to the line that
146+
percentage down in the file.
147+
148+
With the CTRL-] command, the cursor may be in the middle of the identifier.
149+
150+
The used tags are remembered. Commands that can be used with the tag stack
151+
are CTRL-T, ':pop' and ':tag'. ':tags' lists the tag stack.
152+
153+
The 'tags' option can be set to a list of tag file names. Thus multiple
154+
tag files can be used.
155+
156+
Previously used file names are remembered in the alternate file name list.
157+
CTRL-^ accepts a count, which is an index in this list.
158+
159+
Search patterns have more features.
160+
161+
Searches can find the end of a match and may include a character offset.
162+
163+
Count added to '~', ':next', ':Next', 'n' and 'N'.
164+
165+
Added :wnext command. Same as ":write" followed by ":next".
166+
167+
If option "tildeop" has been set, '~' is an operator (must be followed by a
168+
movement command).
169+
170+
With the 'J' (join) command you can reset the 'joinspaces' (js) option to
171+
have only one space after a period (Vi inserts two spaces).
172+
173+
'cw' can be used to change white space formed by several characters (Vi is
174+
confusing: 'cw' only changes one space, while 'dw' deletes all white space).
175+
176+
'o' and 'O' accept a count for repeating the insert (Vi clears a part of
177+
display).
178+
179+
':dis' command shows the contents of the yank buffers.
180+
181+
Previously used file names are remembered in the alternate file name list.
182+
':files' command shows the list of alternate filenames.
183+
'#'<N> means <N>th alternate filename in the list.
184+
185+
Flags after command not supported (no plans to include it).
186+
187+
QuickFix commands included, almost the same as with Manx's Z editor.
188+
The 'errorfile' option has the name of the file with error messages.
189+
190+
":cd" command shows current directory instead of going to the home directory.
191+
":cd ~" goes to home directory.
192+
193+
':source!' command reads Vi commands from a file.
194+
195+
':mkexrc' command writes current modified options and mappings to a ".exrc"
196+
file. ':mkvimrc' writes to a ".vimrc" file.
197+
198+
The :put! command inserts the contents of a register above the current line.
199+
200+
The named register '.' can be used with commands p, P and :put. The contents
201+
of the register is the last inserted text.
202+
203+
':noremap' command can be used to enter a mapping that will not be remapped.
204+
This is useful to exchange the meaning of two keys.
205+
206+
':@r' command executes buffer r (is in some versions of vi).
207+
208+
CTRL-O/CTRL-I can be used to jump to older/newer positions. These are the
209+
same positions as used with the '' command, but may be in another file. The
210+
':jumps' command lists the older positions.
211+
212+
If the 'shiftround' option is set, an indent is rounded to a multiple of
213+
'shiftwidth' with '>' and '<' commands.
214+
215+
The 'scrolljump' option can be set to the minimal number of lines to scroll
216+
when the cursor gets off the screen. Use this when scrolling is slow.
217+
218+
Uppercase marks can be used to jump between files. The ':marks' command lists
219+
all currently set marks. The commands "']" and "`]" jump to the end of the
220+
previous operator or end of the text inserted with the put command. "'[" and
221+
"`[" do jump to the start.
222+
223+
The 'shelltype' option can be set to reflect the type of shell used.
224+
225+
The CTRL-A (add) and CTRL-S (subtract) commands are new. The count to the
226+
command (default 1) is added to/subtracted from the number at or after the
227+
cursor. That number may be decimal, octal (starts with a '0') or hexadecimal
228+
(starts with '0x'). Very useful in macros.
229+
230+
With the :set command the prefix "inv" can be used to invert toggle options.
231+
232+
233+
In insert mode:
234+
235+
The backspace key can be used just like CTRL-D to remove auto-indents.
236+
237+
You can backspace, ctrl-U and CTRL-W over newlines if the 'backspace' (bs)
238+
option is set to non-zero. You can backspace over the start of insert if the
239+
'backspace' option is set to 2.
240+
241+
If the 'repdel' option is reset, a <BS> in replace mode will not delete a
242+
character.
243+
244+
CTRL-T/CTRL-D always insert/delete an indent in the current line, no matter
245+
what column the cursor is in. '0' and '^' before CTRL-D are ignored.
246+
247+
CTRL-@ (insert previously inserted text) works always (Vi: only when typed as
248+
first character).
249+
250+
CTRL-A works like CTRL-@ but does not leave insert mode.
251+
252+
CTRL-B <0-9a-z> can be used to insert the contents of a register.
253+
254+
When the 'smartindent' (si) option is set, C programs will be better
255+
auto-indented.
256+
257+
CTRL-R and CTRL-E can be used to copy a character from above/below the
258+
current cursor position.
259+
260+
After CTRL-V you can enter a three digit decimal number. This byte value is
261+
inserted in the text as a single character. Useful for international
262+
characters that are not on your keyboard.
263+
264+
When the 'expandtab' (et) option is set, a <TAB> is expanded to the
265+
appropriate number of spaces.
266+
267+
The window always reflects the contents of the buffer (Vi does not do this
268+
when changing text and in some other cases).
269+
270+
If Vim is compiled with DIGRAPHS defined, digraphs are supported. A set of
271+
normal Amiga digraphs is included. They are shown with the :digraph" command.
272+
More can be added with ":digraph {char1}{char2} {number}". A digraph is
273+
entered with "CTRL-K {char1} {char2}" or "{char1} BS {char2}" (only when
274+
'digraph' option is set).
275+
276+
277+
general:
278+
279+
Missing options: autoprint (ap), beautify (bf), edcompatible, hardtabs (ht),
280+
lisp, mesg, open, optimize (op), prompt, redraw, slowopen (slow),
281+
warn, window, w300, w1200 and w9600. Terse option ignored.
282+
283+
When the 'compatible' option is set, all options are set for maximum
284+
vi-compatibility
285+
286+
The 'ttimeout' option is like 'timeout', but only works for cursor and
287+
function keys, not for ordinary mapped characters.
288+
289+
There is an option for each terminal string. Can be used when termcap is not
290+
supported or to change individual strings.
291+
292+
On systems that have no job control (most systems but BSD-UNIX) the CTRL-Z
293+
and ":stop" command starts a new shell.
294+
295+
If Vim is started on the Amiga without an interactive window for output, a
296+
window is opened (and :sh still works). You can give a device to use for
297+
editing with the '-d' argument, e.g. "-d con:20/20/600/150".
298+
299+
On startup the VIMINIT or EXINIT environment variables, the file s:.vimrc or
300+
s:.exrc and .vimrc or .exrc are read for initialization commands. When
301+
reading .vimrc and .exrc some commands are not allowed because of security
302+
reasons (shell commands and writing to a file, :map commands are echoed).
303+
304+
Line lenght can be upto 32767 characters, file length upto 2147483646 lines.
305+
If a line is larger than the screen, the last line is filled with <@>s and
306+
only the part of the line before that is shown.
307+
308+
The 'columns' option is used to set or get the width of the display.
309+
310+
The name of the current file name is shown in the title bar of the window.
311+
312+
Wildcards in file names are expanded.
313+
314+
Option settings are read from the first and last few lines of the file.
315+
Option 'modelines' determines how many lines are tried (default is 5). Note
316+
that this is different from the Vi versions that can execute any Ex command
317+
in a modeline (a major security problem).
318+
319+
If the 'insertmode' option is set (e.g. in .exrc), Vim starts in insert mode.
320+
321+
All text is kept in memory. Available memory limits the file size (and other
322+
things such as undo). This may be a problem with MSDOS, is hardly a problem
323+
ont the Amiga and almost never with Unix.
324+
325+
If the "backup" or "writebackup" option is set: Before a file is overwritten,
326+
a backup file (.bak) is made. If the "backup" option is set it is left
327+
behind.
328+
329+
All entered commands and text is written into a script file, ending in
330+
".vim". This can be used to recover your work if the machine crashes during
331+
an edit session. This can be switched off by setting the 'updatecount' option
332+
to 0 or starting Vim with the "-n" option. Use the 'directory' option for
333+
placing the .vim file somewhere else.
334+
335+
The 'shortname' (sn) option, when set, tells Vim that ".bak" and ".vim"
336+
filenames are to be MSDOS-like: 8 characters plus 3 for extention. This
337+
should be used on messydos or crossdos filesystems on the Amiga. If this
338+
option is off, Vim tries to guess if MSDOS filename restrictions are
339+
effective.
340+
341+
Recovery after a crash has a smaller chance for success, because there is no
342+
temporary file.
343+
344+
Error messages are shown at least one second (Vi overwrites error messages).
345+
346+
If Vim asks to "Hit RETURN to continue", you can hit any key. Characters
347+
other than <CR>, <NL> and <SPACE> are interpreted as the (start of) a
348+
command. (Vi only accepts a command starting with ':').
349+
350+
The contents of the numbered registers is remembered when changing files.
351+
352+
The AUX: device of the Amiga is supported.
353+
354+
vi:tw=77:

doc/digraph.doc.uue

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
begin 644 digraph.doc
3+
M5&AE<V4@87)E('1H92!D969A=6QT(&1I9W)A<&@@8VAA<F%C=&5R<R!F;W(@]
4+
M5FEM+B!4:&4@9FER<W0@='=O(&-H87)A8W1E<G,@:6X@"F5A8V@@8V]L=6UN]
5+
M(&%R92!T:&4@8VAA<F%C=&5R<R!Y;W4@:&%V92!T;R!T>7!E('1O(&5N=&5R@
6+
M(&$@9&EG<F%P:"X@26X@=&AE(`IM:61D;&4@;V8@96%C:"!C;VQU;6X@:7,@O
7+
M=&AE(')E<W5L=&EN9R!C:&%R86-T97(N(%1H:7,@;6%Y(&)E(&UA;F=L960@7
8+
M:68@>6]U(`IL;V]K(&%T('1H:7,@9FEL92!O;B!S;VUE=&AI;F<@96QS92!T`
9+
M:&%N(&%N($%M:6=A(&]R('=H96X@>6]U('!R:6YT(&ET+B!4:&4@"F1E8VEM:
10+
M86P@;G5M8F5R(&ES('1H92!!4T-)22!C;V1E(&9O<B!T:&4@8VAA<F%C=&5RL
11+
M+@H*?B$@H2`Q-C$@("!C?""B(#$V,B`@("0D(*,@,38S("`@;W@@I"`Q-C0@?
12+
M("!9+2"E(#$V-2`@('Q\(*8@,38V("`@<&$@IR`Q-C<*(B(@J"`Q-C@@("!CP
13+
M3R"I(#$V.2`@(&$M(*H@,3<P("`@/#P@JR`Q-S$@("`M+2"M(#$W,R`@(')/'
14+
M(*X@,3<T("`@+3T@KR`Q-S4*?F\@L"`Q-S8@("`K+2"Q(#$W-R`@(#(R(+(@C
15+
M,3<X("`@,S,@LR`Q-SD@("`G)R"T(#$X,"`@(&IU(+4@,3@Q("`@<'`@MB`QJ
16+
M.#(*?BX@MR`Q.#,@("`L+""X(#$X-"`@(#$Q(+D@,3@U("`@;RT@NB`Q.#8@.
17+
M("`^/B"[(#$X-R`@(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