[88013] trunk/dports/textproc/dblatex/Portfile

Eric Cronin ecronin at macports.org
Fri Dec 16 10:22:51 PST 2011

On 16.12.2011 09:25, Chris Perl wrote:
> On Fri, Dec 16, 2011 at 03:30:30AM +0100, Clemens Lang wrote:
>> However, since the modeline contains ft=tcl for vim it actually
>> overrides the Portfile syntax from [1]. I personally find this 
>> pretty
>> annoying. If somebody on this list has a better suggestion on how to
>> make vim ignore this part of the modeline and set ft=portfile 
>> instead
>> I'm happy to change it back, but until then I vote for either 
>> dropping
>> ft=tcl completely or replacing it by ft=portfile.
> Not ideal, but you could modify ftdetect/macports.vim such that it 
> sets
> 'nomodeline' for files that match 'Portfile' and sets everything the
> modeline would have.  i.e.:
> au BufRead,BufNewFile Portfile set nomodeline ft=portfile fenc=utf-8 
> et
> sw=4 ts=4 sts=4
> Obviously you'd then be ignoring anything else that might be added to
> the modeline in the future.

"ft=tcl.Portfile" as the (official recommended) modeline do the trick I 
think.  For those with macports.vim it will get applied after the tcl 
style, for those without it the second style will just be a silent 
noop...  macports.vim may possibly need some tweaking to unset anything 
the tcl style does that it doesn't explicitly override in order for 
ft=Portfile and ft=tcl.Portfile to behave exactly the same.

This doesn't solve the issue that all the existing ports have a 
modeline that overrides macports.vim, but it's probably better than just 
ft=Portfile in the modeline since it falls back to pure tcl mode if the 
person editing doesn't have macports.vim installed.


More information about the macports-dev mailing list