Hi,

there is a flaw in base vi when moving by sentences, going forward is not
equal to going backward.  Here's what man vi says:

  [count] (
  [count] )
    Move count sentences backward or forward, respectively.  A
    sentence is an area of text that begins with the first nonblank
    character following the previous sentence, paragraph, or section
    boundary and continues until the next period, exclamation mark,
    or question mark character, followed by any number of closing
    parentheses, brackets, double or single quote characters,
    followed by either an end-of-line or two whitespace characters.
                                         ^^^^^^^^^^^^^^
    Groups of empty lines (or lines containing only whitespace
    characters) are treated as a single sentence.

Going forward a sentence follows this rule, but going backwards stops at
a single space before a punctuation mark.

Here's an example:

A sentence.  A sentence containing !, ? and .  A third sentence!
)            )                                 )
(            (                          (      (

When the double spaces are condensed to one, the whole line is regarded as
one large sentence going forward, but the same pattern as above is shown when
going backwards.


With skippable characters, it is even more different:

A sentence.  A sentence containing [!'], '?' and .  A third sentence!
)            )                                      )
(            (                         (     (      (

Again, with single spaces, the whole line is regarded as one going forwards,
and the same behavior as above is shown when going backwards.


Now, before doing any work, is there even any interest in fixing this, i.e. 
that moving for- and backwards produce the same results?  If so, which behavior 
is desired?

-- Nils

Reply via email to