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
return
endif
let lnum = lnum + 1
endwhile
endfunc
> 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 -- [email protected] -- 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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.