[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vile] Switch for handling of whitespace on J
From: |
Thomas Dickey |
Subject: |
Re: [vile] Switch for handling of whitespace on J |
Date: |
Fri, 02 Nov 2012 04:38:40 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Thu, Nov 01, 2012 at 09:23:02PM -0400, Paul Fox wrote:
> thomas wrote:
> >
> > So... thinking this is a new feature request, the question comes up:
> > what's the most useful way to extend this. There are 3 choices
> > embedded here:
> >
> > a) join without inserting a space
> > b) insert two spaces
> > c) insert single space
> >
> > We could add three corresponding mode values (whether character-class,
> > regular expression or whatever):
> >
> > join-zero-spaces
> > join-two-spaces
> > join-one-spaces
> >
> > and then you'd only have to have set something like
> >
> > join-zero-spaces={whatever makes no matches}
> > join-two-spaces={whatever makes no matches}
> > join-one-spaces={nonspace as is done already}
> >
> > Regular expressions might be overkill, but would at least be consistent
> > with everything else in vile. Character classes haven't been used as
> > mode-values (yet), but would be close to the current logic. (The syntax
> > and semantics would differ - gotta choose one or the other at design time).
>
> and i _think_ this might allow for extending the two-space rule, so
> that one doesn't end up with two spaces after mr. or mrs. or st. etc.
> (i used to include "i.e." and "e.g." in that list, until you pointed
> out that correctly they're both always followed by a comma. that made
> my editing life much happier. :-)
agreed (though I seem to recall some disagreement from someone on lynx-dev
who insisted that the comma was incorrect in British :-)
I don't see any need to generalize the "two" into some other number,
though having 3 explicit references to a count seems as if vile should
instead support some type of array of numbers for this (again probably
overkill...)
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature