I wrote a syntax file for hg (Mercurial) commit message.
I'm not familiar with hg and Vim syntax file, but any comments are welcome.
https://gist.github.com/3129572
I wonder why Vim uses hg for SCM but Vim doesn't have a syntax file for that.
BTW, I have posted several messages to this ML, but some of my posts
are not found on the Web interface. Is my e-mail address blocked?
For example, only Bram's response can be seen in the following thread:
https://groups.google.com/d/topic/vim_dev/Me2Q6HDtC1I/discussion
Regards,
Ken Takata
I have updated the patch.
https://gist.github.com/3129572
(Hg comment lines begin with 'HG:' not 'HG: '.)
The same file (but not a patch) is also available at
https://github.com/k-takata/hg-vim .
2012/07/18 21:51:25 UTC+9 Ingo Karkat:
> Dan LaMotte has already written such a file, but the attempt to get it included
> apparently fizzled out.
> http://vim.1045645.n5.nabble.com/hg-commit-syntax-file-td1205296.html
Thanks for your comment.
Hmm, it seems that Dan's file was not included because of copyright problem.
> Superficially, yours looks similar to his, but maybe you'll find something in
> there that you haven't considered yet. I'd definitely welcome an inclusion in
> the Vim runtime.
I looked into his file.
I think mine is a little bit simpler and it's enough.
An obvious difference can be seen when coloring the following lines:
HG: added file1
HG: changed file2
HG: removed file3
Mine:
The status (added, changed or removed) and the file name use the same color.
Each status uses a different color. (same as svn.vim)
His:
The status and the file name use different colors.
All status use the same color.
Regards,
Ken Takata
2012/07/22 4:01:04 UTC+9 Ingo Karkat:
> I like the different highlighting of added / changed / removed. Having a
>
> different group for the file name is probably less important, but would be easy
>
> to add, too.
I don't think it is important, but if you send me a pull request, I will include it.
> One more request, though: Wouldn't it be more appropriate to name the syntax
>
> "hgcommit", because it's more precise, and for future compatibility?
OK, I changed the name from "hg" to "hgcommit".
A patch for filetype.vim was also updated.
https://gist.github.com/3129572
(https://github.com/k-takata/hg-vim)
Bram,
I think it is now ready for inclusion.
I hope this would be a help for hg users and also for Vim contributors.
Thank you.
--
Regards,
Ken Takata