[m-rev.] vim syntax highlighting & line wrapping

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Feb 4 18:18:58 AEDT 2003


On 28-Jan-2003, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> Fergus Henderson, Monday, 27 January 2003:
> > +  " The complicated regexp here matches an 80-column string,
> > +  " with proper treatment of tabs (assuming the tab size is 8):
> > +  " each row consists of 10 columns, and each column consists of either 8
> > +  " non-tab characters, or 0-7 non-tab characters followed by a tab.
> > +  syn match   mercuryFirst80 +^\([^	]\{8}\|[^	]\{0,7}	\)\{10}+                                contains=ALL
> > +  syn match   mercuryTooLong +^\([^	]\{8}\|[^	]\{0,7}	\)\{10}..*+                             contains=mercuryFirst80
> 
> Looks good, but it's better to use `<TAB>' or `\t' rather than raw tabs
> in regular expressions provided you don't have `l' in your cpoptions vim
> variable.

Hmm.  That would definitely be more readable, but is it safe to assume
here that the cpoptions variable won't contain `l'?

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list