Vim syntax file for hgrc

Ted Pavlic ted at tedpavlic.com
Mon Dec 8 23:55:26 UTC 2008


>> … the "cfg" filetype works well …
> 
> Not really. It doesn't handle = within values.
> 
> (BTW, I just uploaded a new version that supports comments.)

Here's a recent post on a related thread in the vim_use mailing list:

=====
So does the already existing 'dosini' filetype.  However, neither
'dosini' nor your 'ini' syntax file allow for comments at end of line,
ie

      gitproxy=default-proxy ; for all the rest

gitconfig handles this, as well as checking that strings stored to
variables are properly terminated, and that recognized escape
characters are not highlighted within a string.  All of these are
valuable things for a syntax file to do.  'cfg' or 'ini' or 'dosini'
aren't inappropriate, they just don't know as much about the format
git requires and can't highlight it as well because of that.  Like
setting ft=c in a C++ file, most things will work but not everything.
=====

So evidently there is a "dosini" filetype. However, "gitconfig" seems to 
have some special extensions.

Maybe "gitconfig" is the appropriate file type for hgrc files...

--Ted


-- 
Ted Pavlic <ted at tedpavlic.com>



More information about the Mercurial mailing list