On 4/9/07, Nikolai Weibull <[EMAIL PROTECTED]> wrote:
The manSubHeading is defined as

syn match  manSubHeading      "^\s\{3\}[a-z][a-z ]*[a-z]$"

This will, however, match more lines than I think is intended.  It
will, for example, match the line

\t  returns are what are recorded and compared with the data git keeps

where "\t" is a horizontal tabulation.  I'm guessing that the actual
regex should be

  ^ \{3\}[a-z][a-z ]*[a-z]$
I hope nobody minds if I take this opportunity to ask a question about
vim's pattern matching.

After reading |pattern| I wonder if the following is more efficient:

syn match manSubHeading '^ \{3\}\l\l\?\l$'

Taken from |pattern|:

       - Matching with a collection can be slow, because each character in
         the text has to be compared with each character in the collection.
         Use one of the other atoms above when possible.  Example: "\d" is
         much faster than "[0-9]" and matches the same characters

Do people find this to make a different for moderate file sizes, e.g.
the man page for 'less' being ~2000 lines?

--
Ian Tegebo

Reply via email to