[m-rev.] for review: rewrite of vim syntax file

Paul Bone paul at bone.id.au
Sun Apr 5 00:12:22 AEDT 2015


On Sat, Apr 04, 2015 at 12:52:05PM +0800, Sebastian Godelet wrote:
> Hi,
>
> after trying to improve some aspects of the existing Vim
> syntax file provided in the Mercury distribution,
> I came to the conclusion that it might be better to do a rewrite
> which tries to be as backwards compatible as possible while still
> allowing to add features to both the syntax file and the Vim
> plugin script.
> Do to the size of the diff I attached it rather than inlining it into  
> the email.

This looks really promising.  I have some minor questions however since I
(and I doubt anyone else on the team) knows this much about vim scripting
I cannot review it critically.  Therefore I propose to test it out and see
how it goes.


>  - support underlining of local variables within function or
>    predicate bodies,
>    which is a feature found in SWI-Prolog. Additionally one can use
>    <C-K>r and <C-K>R to rename the underlined variable.

What does this mean?  This sounds like a vim feature that I didn't know
existed.

>  - Different way of supporting transparent comment highlighting, such
>    that spell checking works only on comments in both fully highlighted
>    and partially highlighted comments, this works best if comment
>    markup is enables (see above).
>    Without this, spell checking would have to be enabled
>    for Mercury code as well which Vim is not good at.

I also want to learn more about this.  I might check the manual while I
experiment with the new vim files.


> diff --git a/vim/ftplugin/mercury.vim b/vim/ftplugin/mercury.vim
> index 917e46c..2083d4c 100644
> --- a/vim/ftplugin/mercury.vim
> +++ b/vim/ftplugin/mercury.vim
> @@ -1,6 +1,7 @@
>  " Vim syntax file
>  " Language:     Mercury
> -" Maintainer:   Ralph Becket <rafe at cs.mu.oz.au>
> +" Maintainer:   Mercury Team <mercury at mercurylang.org>
> +" Last Change:  2014-07-07
>  " vim: ts=2 sw=2 et

2015-04-04

Feel free to put your name there, it looks like you're the new maintainer
and best person to contact if anyone has any questions.


>  if exists("b:did_mercury_ftplugin")
> @@ -17,7 +18,7 @@ setlocal tags+=$HOME/mercury/tags.library,$HOME/mercury/tags.compiler
>  
>    " Handy if you use `:make'.
>    "
> -setlocal makeprg=mmake
> +setlocal makeprg="mmake"

Should that be mmc --make?

mmake is deprecated in favor of mmc --make but mmake is still used to build
Mercury itself.


-- 
Paul Bone



More information about the reviews mailing list