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

Re: [Cheetahtemplate-discuss] Vim syntax file for Cheetah

Expand Messages
  • Max Ischenko
    ... a ... Put .vim files to syntax/ catalog (either system-wide or ~/) and then do ... See :h mysyntaxfile. ... Enterprise Linux Forum Conference & Expo, June
    Message 1 of 5 , May 10, 2003
    • 0 Attachment
      > > I wrote the Vim syntax file for Cheetah and about to send it to Bram for
      > > inclusion in the upcoming 6.2 release.
      > >
      > > I'm no Cheetah or Vim expert, so please help me by reviewing it and send
      a
      > > comment (either in ML or personally) about errors/omissions and possible
      > > improvements. Thanks!
      > >
      > > See attachments: there are cheetah.vim which defines Cheetah syntax and
      > > htmlcheetah.vim which is for HTML pages with Cheetah directives (.tmpl
      > > files).
      >
      > How do you use this? I ran "gvim index.tmpl", then ":so ~/cheetah.vim"
      > and "so ~/htmlcheetah.vim" but the colors didn't change.
      > ":syntax cheetah" gives an error, ":color cheetah" says color unknown.
      > I set the syntax to Visual Basic (using the gvim menu) so it would be
      > obvious if the colors change to Cheetah colors, but that didn't help
      > either.
      >
      > I'm using vim 6.1 on Debian (testing).

      Put .vim files to syntax/ catalog (either system-wide or ~/) and then do
      :set ft=htmlcheetah
      See :h mysyntaxfile.





      -------------------------------------------------------
      Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
      The only event dedicated to issues related to Linux enterprise solutions
      www.enterpriselinuxforum.com

      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    • Mike Orr
      ... It works great. The htmlcheetah syntax definitely provides an alternative to the perl syntax I usually use with these files. However, htmlcheetah uses the
      Message 2 of 5 , May 10, 2003
      • 0 Attachment
        On Fri, May 09, 2003 at 09:08:53PM +0400, Max Ischenko wrote:
        > Hi all,
        >
        > I wrote the Vim syntax file for Cheetah and about to send it to Bram for
        > inclusion in the upcoming 6.2 release.
        >
        > I'm no Cheetah or Vim expert, so please help me by reviewing it and send a
        > comment (either in ML or personally) about errors/omissions and possible
        > improvements. Thanks!
        >
        > See attachments: there are cheetah.vim which defines Cheetah syntax and
        > htmlcheetah.vim which is for HTML pages with Cheetah directives (.tmpl
        > files).

        It works great. The htmlcheetah syntax definitely provides an alternative
        to the perl syntax I usually use with these files.

        However, htmlcheetah uses the same red for #directives as for <HTML> tags.
        That makes it harder to find the directives, for instance in:

        <TD ALIGN="left">
        <BIG><STRONG><EM>${htTitle}</EM></STRONG></BIG>
        <BR>
        <SMALL>
        <A HREF="/">Home</A>
        #for $url, $label in $crumbs
         >> <A HREF="${url}">${label}</A>
        #end for
        </SMALL>
        </TD>

        Given a choice of that vs perl's way of putting the entire directive line
        in "comment color" (royal blue, since they look like Perl comments), I'm
        inclined to prefer the perl way because the directives stand out more.
        But the best way would be to use a color that is different from both
        <HTML> tags and from comments. I don't know how easy that is to do with
        the vim syntax tools.

        --
        -Mike (Iron) Orr, mso@... (iron@...)
        English * Esperanto * Russkiy * Deutsch * Espan~ol


        -------------------------------------------------------
        Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
        The only event dedicated to issues related to Linux enterprise solutions
        www.enterpriselinuxforum.com

        _______________________________________________
        Cheetahtemplate-discuss mailing list
        Cheetahtemplate-discuss@...
        https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
      • Max Ischenko
        ... a ... You could link cheetahTemplate and cheetahStatement syntax groups to whatever you want, see :help :hi. For example, hi link cheetahStatement
        Message 3 of 5 , May 10, 2003
        • 0 Attachment
          > > I wrote the Vim syntax file for Cheetah and about to send it to Bram for
          > > inclusion in the upcoming 6.2 release.
          > >
          > > I'm no Cheetah or Vim expert, so please help me by reviewing it and send
          a
          > > comment (either in ML or personally) about errors/omissions and possible
          > > improvements. Thanks!
          > >
          > > See attachments: there are cheetah.vim which defines Cheetah syntax and
          > > htmlcheetah.vim which is for HTML pages with Cheetah directives (.tmpl
          > > files).
          >
          > It works great. The htmlcheetah syntax definitely provides an alternative
          > to the perl syntax I usually use with these files.
          >
          > However, htmlcheetah uses the same red for #directives as for <HTML> tags.
          > That makes it harder to find the directives, for instance in:
          >
          > Given a choice of that vs perl's way of putting the entire directive line
          > in "comment color" (royal blue, since they look like Perl comments), I'm
          > inclined to prefer the perl way because the directives stand out more.
          > But the best way would be to use a color that is different from both
          > <HTML> tags and from comments. I don't know how easy that is to do with
          > the vim syntax tools.

          You could link cheetahTemplate and cheetahStatement syntax groups
          to whatever you want, see :help :hi.

          For example,
          hi link cheetahStatement PreCondit
          hi link cheetahKeyword Define

          Or,
          hi cheetahStatement guibg=brown
          hi cheetahKeyword guibg=brown
          hi cheetahPlaceHolder guibg=brown

          Put this into ~/.vim/after/syntax/cheetah.vim or modify my cheetah.vim
          directly.






          -------------------------------------------------------
          Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
          The only event dedicated to issues related to Linux enterprise solutions
          www.enterpriselinuxforum.com

          _______________________________________________
          Cheetahtemplate-discuss mailing list
          Cheetahtemplate-discuss@...
          https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
        Your message has been successfully submitted and would be delivered to recipients shortly.