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

Re: About syntax hilight

Expand Messages
  • Bram Moolenaar
    ... -- Corduroy pillows: They re making headlines! /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net /// Creator of Vim - Vi
    Message 1 of 2 , Dec 31, 2003
    • 0 Attachment
      Fabio S wrote:

      > I am defining a syntax. The problem is that the keyword I want to hilight
      > is "contains". So I try with
      >
      > syn keyword myClass contains
      >
      > but, as you can guess, I get an error when I open a file relative to this
      > syntax file, because "contains" is not allowed to stay in that position.
      >
      > Is there a workaround? I used
      >
      > syn keyword myClass contain[s]
      >
      > but I would like to use a better solution, if any.

      You can use a match:

      :syn match myClass "\<contains\>"

      --
      Corduroy pillows: They're making headlines!

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
      \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
      \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
    Your message has been successfully submitted and would be delivered to recipients shortly.