So, to do this properly, we have to patch vim's filetype.vim and
scripts.vim, which handle filetype detection. I have made the
following patches, and they work very well at detecting Perl/Pod 6.
filetype.vim.diff: http://gist.github.com/179863
scripts.vim.diff: http://gist.github.com/179865
If you don't want to apply the patches or wait for vim to include
them, the same can be accomplished by putting the code into
~/.vim/filetype.vim and ~/.vim/scripts.vim on your machine.
> This is suboptimal,
> however, because when vim processes the modeline, it has *already*
> sourced the ftplugin/syntax/indent files for Perl 5
So the key is, we're looking for suggestions on how to do it better.
I also fear that the "use v6/whatever" will not be robust enough.
--
Andy Lester => an...@petdance.com => www.theworkinggeek.com => AIM:petdance
As far as I know, this logic is what has been proposed for the Perl 6
specification. That is, all Perl files will be considered to be Perl 5
unless the first like of code is "use v6" or a
grammar/class/module/role declaration.