An easy, quick vi tutorial...
Bill Campbell
bill at celestial.com
Wed Oct 24 15:41:02 PDT 2007
On Wed, Oct 24, 2007, Bob Stockler wrote:
>Mark Luljak wrote (on Wed, Oct 24, 2007 at 04:30:02PM -0400):
>
>| Only Kenneth Brody would say something like:
>| > Ever try TECO on a noisy phone line? (Fortunately, neither have I.)
>|
>| No, but I've tried emacs, vi, and pico on them. :( Things
>| get...interesting.
>|
>| > IIRC, the original (and many current) vi programs have a "redo", but
>| > that's only because hitting "u" a second time undoes the undo.
>|
>| Right. Whereas vim has a bigger list of undo's (I -think- it's
>| configurable, don't quote me on that), and the subsequent list of redos,
>| both functions bound to different keys.
>
>This got me interested in "vi" stuff . . .
>
> 1 - I found I had VILEARN on my system.
>
> 2 - I also found a later version of it by Googling "VILEARN" on
> the Worldwide Web.
>
> 3 - I found VIM 7.1 to replace the VIM 7.0 on my Windows boxes.
> and VIM has a much more extensive tutor program (for those
> needing just an introduction or much more extensive courses).
> BTW, SCO OpenServer 6 has VIM on it.
I couldn't even begin to work on MS-DOS systems until I found a
copy of elvis, an early vi for DOS. With that and a working
perl, I did some fairly serious work on DOS (often writing batch
files in perl, the exec'ing the batch file to free memory that
perl was using).
...
>PS - I use "mutt" as my MUA an "vi" to write/edit my messages.
Is there any other way to do e-mail? I write e-mail using nroff
markup when doing things like numbered and bullet lists, then use
another neat feature of vi(m), reformatting a block of text by
passing it through a shell command. I have my own ``fmt''
command that does this, and this in my ~/.exrc or ~/.vimrc files.
map <F5> {!}fmt
The function key macro formats the current paragraph by running
it through the ``fmt'' script. The ``{'' positions the cursor to
the top of the paragraph. The ``!}fmt'' then says format to the
end of the paragraph (``}'') by running the ``fmt'' command.
Another stupid vi trick is to write a line, position the cursor
in the line, and press ``!!sh<ENTER>'' which replaces the
contents of the line with the output of the command on the line.
For instance, if I have a line ``cal 2008'' it will produce:
2008
January February March
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
1 2 3 4 5 1 2 1
6 7 8 9 10 11 12 3 4 5 6 7 8 9 2 3 4 5 6 7 8
13 14 15 16 17 18 19 10 11 12 13 14 15 16 9 10 11 12 13 14 15
20 21 22 23 24 25 26 17 18 19 20 21 22 23 16 17 18 19 20 21 22
27 28 29 30 31 24 25 26 27 28 29 23 24 25 26 27 28 29
30 31
April May June
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
1 2 3 4 5 1 2 3 1 2 3 4 5 6 7
6 7 8 9 10 11 12 4 5 6 7 8 9 10 8 9 10 11 12 13 14
13 14 15 16 17 18 19 11 12 13 14 15 16 17 15 16 17 18 19 20 21
20 21 22 23 24 25 26 18 19 20 21 22 23 24 22 23 24 25 26 27 28
27 28 29 30 25 26 27 28 29 30 31 29 30
July August September
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
1 2 3 4 5 1 2 1 2 3 4 5 6
6 7 8 9 10 11 12 3 4 5 6 7 8 9 7 8 9 10 11 12 13
13 14 15 16 17 18 19 10 11 12 13 14 15 16 14 15 16 17 18 19 20
20 21 22 23 24 25 26 17 18 19 20 21 22 23 21 22 23 24 25 26 27
27 28 29 30 31 24 25 26 27 28 29 30 28 29 30
31
October November December
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
1 2 3 4 1 1 2 3 4 5 6
5 6 7 8 9 10 11 2 3 4 5 6 7 8 7 8 9 10 11 12 13
12 13 14 15 16 17 18 9 10 11 12 13 14 15 14 15 16 17 18 19 20
19 20 21 22 23 24 25 16 17 18 19 20 21 22 21 22 23 24 25 26 27
26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31
30
Bill
--
INTERNET: bill at celestial.com Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
Intellectually, teachers fall between education theorists and bright
cocker spaniels. (Probably closer to the education theorists. The AKC has
been doing wonders with spaniels.) If you think I'm kidding look at the
GREs for education majors, whose scores are the lowest of all fields, and
remember that these are the smart ones. -- http://www.FredOnEverything.net
More information about the Filepro-list
mailing list