Loading ...
Sorry, an error occurred while loading the content.

Re: {patch} man.vim syntax file

Expand Messages
  • Bram Moolenaar
    ... This also came up in another message shortly ago. The solution was to use f for the manpage name. I suppose that s right, since the name of the manual
    Message 1 of 4 , Feb 2, 2001
    • 0 Attachment
      Craig Barkhouse wrote:

      > This patch modifies the man.vim syntax file so that the period (".") is
      > acceptable in the man page name. Lots of configuration-related man pages,
      > e.g. "inetd.conf", use the period.
      >
      > 16,17c16,17
      > < syn match manReference "[a-z][a-z0-9_]*([1-9][a-z]\{0,1})"
      > < syn match manTitle "^\i\+([0-9]\+[a-z]\=).*"
      > ---
      > > syn match manReference "[a-z][a-z0-9_\.]*([1-9][a-z]\=)"
      > > syn match manTitle "^[a-z][a-z0-9_\.]*([0-9]\+[a-z]\=).*"

      This also came up in another message shortly ago. The solution was to use
      "\f" for the manpage name. I suppose that's right, since the name of the
      manual page is a file name as well. The required "(1)" after it makes sure it
      doesn't match too often:

      syn match manReference "\f\+([1-9][a-z]\=)"
      syn match manTitle "^\f\+([0-9]\+[a-z]\=).*"

      > Anyway, I tried adding the period after the \i as shown below, but for some
      > reason it didn't work. Maybe someone can tell me why. Can't you use \i
      > within square brackets?
      >
      > syn match manTitle "^[\i\.]\+([0-9]\+[a-z]\=).*"

      Indeed, you can't use \i here. Inside [] the backslash is not a special
      character, except in a few specific cases. This is for Vi compatibility.

      --
      hundred-and-one symptoms of being an internet addict:
      118. You are on a first-name basis with your ISP's staff.

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    • Craig Barkhouse
      ... Thanks, this does the job and is much neater to look at. ... Thanks for the tip.
      Message 2 of 4 , Feb 2, 2001
      • 0 Attachment
        Bram wrote:
        > syn match manReference "\f\+([1-9][a-z]\=)"
        > syn match manTitle "^\f\+([0-9]\+[a-z]\=).*"

        Thanks, this does the job and is much neater to look at.

        > > syn match manTitle "^[\i\.]\+([0-9]\+[a-z]\=).*"
        > Indeed, you can't use \i here. Inside [] the backslash is not a special
        > character, except in a few specific cases. This is for Vi compatibility.

        Thanks for the tip.
      Your message has been successfully submitted and would be delivered to recipients shortly.