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

69015Re: RDF manifests highlighted as error from line 2 to the end

Expand Messages
  • Bram Moolenaar
    Apr 8, 2013
    • 0 Attachment
      Axel Castellane wrote:

      > Sorry for the late answer. redif files do have comments that start with
      > /^#/, but they are likely to have no comment at all since they are very
      > self-explicit...
      > However, any redif file must have a name in *.rdf, and must also have its
      > first line, except for potential comments, in /^\ctemplate-type:/.
      > Something like
      > let lnum = 1
      > while lnum <= 5
      > let s:line =getline(lnum)
      > if s:line =~ "^\ctemplate-type:"
      > setf redif
      > endif
      > let lnum = lnum + 1
      > endwhile
      > that happens inside an autocommand for *.rdf files is most likely to catch
      > 99% of redif files. I hope it helps.

      OK, now I have this at line 2566 of filetype.vim:

      " ReDIF
      " Only used when the .rdf file was not detected to be XML.
      au BufRead,BufNewFile *.rdf call s:Redif()
      func! s:Redif()
      let lnum = 1
      while lnum <= 5 && lnum < line('$')
      if getline(lnum) =~ "^\ctemplate-type:"
      setf redif
      let lnum = lnum + 1

      > Finally, I attached a new version of the syntax file.

      I'll include it, thanks.

      hundred-and-one symptoms of being an internet addict:
      136. You decide to stay in a low-paying job teaching just for the
      free Internet access.

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ an exciting new programming language -- http://www.Zimbu.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 7 messages in this topic