[m-rev.] vim syntax highlighting & line wrapping
Ralph Becket
rafe at cs.mu.OZ.AU
Tue Jan 28 08:45:05 AEDT 2003
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. In fact, you could use [^[:blank:]] rather than [^ \t] for
maximum clarity.
Ralph
--------------------------------------------------------------------------
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