Re: vi.beginner diff and analysis (vi.advanced to follow)

2020-05-24 Thread Ingo Schwarze
Hi Andras,

Andras Farkas wrote on Sun, May 24, 2020 at 01:27:18AM -0400:

> I went through vi.beginner.

Thanks.

> It works both with vi's regular settings,
> and with the settings applied via EXINIT in vi.tut.csh.

Good.

> I have a diff attached.  I was mostly light and gentle with my
> changes,

That's good, excessive and gratuitous changes usually make patches
harder to review, and consequently they more easily fall through
the cracks.

> but I indeed did change some outdated info and incorrect info.
> 
> I seriously doubt vi.tut.csh's usefulness,

Indeed.  In particular, setting an environment variable right
before exiting a shell makes very little sense to me.

> but I'll ultimately judge
> it after going through vi.advanced.  I'll reply to my own email with a
> vi.advanced diff when I go through it. (not tonight, but some night
> soon)

Sounds good.

> Notably, I wasn't able to attach my diff in Firefox

???

Why would you use a web browser for email?  That's just terrible
from a security standpoint and abysmal in terms of usability on
top of that.  And of course, it very often results in misformatted
mails and the like.

In case that isn't obvious, for handling mail, use a real mail
user agent, like mutt(1) or something similar that you like.

> on the OpenBSD snapshot I used.  Neither could Firefox use the normal
> file: URL type.

Sure, you don't want your web browser messing with your private data,
or do you?  On OpenBSD, firefox uses unveil(2) to prevent privacy
breaches when the browser is buggy, see

  /usr/local/share/doc/pkg-readmes/firefox

> Index: vi.beginner

Committed, thanks.
  Ingo



vi.beginner diff and analysis (vi.advanced to follow)

2020-05-23 Thread Andras Farkas
I went through vi.beginner.  It works both with vi's regular settings,
and with the settings applied via EXINIT in vi.tut.csh.
I have a diff attached.  I was mostly light and gentle with my
changes, but I indeed did change some outdated info and incorrect
info.

I seriously doubt vi.tut.csh's usefulness, but I'll ultimately judge
it after going through vi.advanced.  I'll reply to my own email with a
vi.advanced diff when I go through it. (not tonight, but some night
soon)


Notably, I wasn't able to attach my diff in Firefox on the OpenBSD
snapshot I used.  Neither could Firefox use the normal file: URL type.
(I had to scp my diff to another machine to attach it to this email)
Index: vi.beginner
===
RCS file: /cvs/src/usr.bin/vi/docs/tutorial/vi.beginner,v
retrieving revision 1.2
diff -u -p -r1.2 vi.beginner
--- vi.beginner	8 Nov 2003 19:17:29 -	1.2
+++ vi.beginner	24 May 2020 05:03:29 -
@@ -174,19 +174,19 @@ look at any line in the file we like.  U
 followed by a character used in an {m} command, we can return to any location
 in the file we have marked.
 
-However, try {m3}, or {mM}.  You should hear a beep, or bell.  Only lower-case
-letters are acceptable to the {m} and {'} commands: numbers, upper-case
-letters, and special characters are not acceptable.
-
-If you type the {'} command with a character that is lower-case alphabetic but
-that has not been used in an {m} command, or for which the 'marked' text has
-been deleted, you will also get a beep.  Try {'i}.  You should get a beep
-because the command {mi} has never been issued.  (Unless you've been
-experimenting.)
+Try {m3}, {mM}, or {m$}.  Not only lower-case letters are acceptable to the
+{m} and {'} commands: numbers, upper-case letters, and special characters are
+also acceptable.
+
+If you type the {'} command with a character that that has not been used in an
+{m} command, or for which the 'marked' text has been deleted, you will get a
+beep.  Try {'i}.  You should get a beep because the command {mi} has never
+been issued.  (Unless you've been experimenting.)
 
 The command {''} attempts to return you to the location at which you last
 modified some part of your file.  However, my experience has been that it is
 difficult to predict exactly where you will end up.  
+
 Section 10: {^M} {-}
 Now do {ma}, marking your position at the top of the screen.  Now hit {^M} (or
 return) until the cursor is right ... 
@@ -235,12 +235,12 @@ The {-} command moves the cursor to the 
 {-}, which attempts to move the cursor to the previous line in this file.
 However, that line is not on the screen.  The resulting action will depend on
 your terminal.  (Do a {^Mz^M} to reposition the file).  On intelligent
-terminals (e.g. VT100s, Z19s, Concept 100s), a top line is 'scrolled on' and
-the bottom line is 'scrolled off'.  Other terminals, however, may not have
-this 'reverse scrolling' feature.  They will simply repaint the screen with
-the cursor line in the middle of the screen.  On such terminals it is
-necessary to type {z^M} to get the cursor line back to the top of the screen.
-
+terminals (e.g. VT100s, xterm, most modern terminals), a top line is 'scrolled
+on' and the bottom line is 'scrolled off'.  Some very old terminals, however,
+may not have this 'reverse scrolling' feature.  They will simply repaint the
+screen with the cursor line in the middle of the screen.  On such terminals it
+is necessary to type {z^M} to get the cursor line back to the top of the
+screen.
 
 
 
@@ -358,13 +358,13 @@ sequence shown):
 
 The first command looks for the next occurrence of the string 'Here 2'.
 However the second line of commands looks for an occurrence of 'Here 2' that
-is at the beginning of the line.  When the up-arrow is the first character of
-a search string it stands for the beginning of the line.  When the dollar-sign
-is the last character of the search string it stands for the end of the line.
-Therefore, the third line of commands searches for the string only when it is
-at the end of the line.  Since there is only one place the string begins a
-line, and only one place the string ends the line, subsequent {//^M} and
-{??^M} will find those same strings over and over.
+is at the beginning of the line.  When the caret (circumflex, up-arrow) is the
+first character of a search string it stands for the beginning of the line.
+When the dollar-sign is the last character of the search string it stands for
+the end of the line.  Therefore, the third line of commands searches for the
+string only when it is at the end of the line.  Since there is only one place
+the string begins a line, and only one place the string ends the line,
+subsequent {//^M} and {??^M} will find those same strings over and over.
 
 The {n} command will find the next occurrence of the / or ? search
 string.  Try {/Here 2/^M} followed by several {n} and observe the
@@ -380,7 +380,7 @@ the screen.  Remember tha