Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[syntax patch proposal] config.vim recognize AC_MSG as strings #133

Closed
GoogleCodeExporter opened this issue Aug 18, 2015 · 4 comments
Closed

Comments

@GoogleCodeExporter
Copy link

In configure.ac scripts, the AC_MSG_ERROR([...]) defines a string environment. 
This patch makes vim syntax recognize this correctly, and I also made the 
educated guess that this more generally holds for any AC_MSG_[A-Z]*([...]) 
environments.

The trouble with not detecting this is that you can have ' or ` inside these 
strings, which are then defining a string environment until the next occurence 
of ' or ` according to the current syntax file. This causes in my case huge 
'string environments' which makes the syntax highlighting kind of pointless.

I also reduced two lines for comment recognition by using \z(\).

And fixed one spelling mistake in the comments. Please find the patch attached. 
Please also note I am no expert in writing these syntax files, so please feel 
free to edit as you see fit!

Minor comment:
I was originally hoping that this would work because I thought it would be 
cleaner:
syn region  configstring start="AC_MSG_[A-Z]*"ms=s+14 end="\])"me=e-2

However, the ms=s+14 does not work somehow. Is this a bug? If I used hs=s+14 
instead it is fine, but then the AC_MSG_ part and ([ is not highlighted as they 
should.

Original issue reported on code.google.com by yngve.le...@gmail.com on 10 May 2013 at 3:26

Attachments:

@GoogleCodeExporter
Copy link
Author

This should be taken to the maintainer of that particular syntax file. I wrote 
him a short message to take a look at this patch.

Original comment by chrisbr...@googlemail.com on 9 Oct 2014 at 9:21

  • Added labels: Runtime

@GoogleCodeExporter
Copy link
Author

maintainers email bounces. You might want to include the patch nevertheless.

Original comment by chrisbr...@googlemail.com on 9 Oct 2014 at 9:34

@GoogleCodeExporter
Copy link
Author

Original comment by chrisbr...@googlemail.com on 9 Jan 2015 at 12:28

  • Added labels: patch

@GoogleCodeExporter
Copy link
Author

Thanks.  I'll check for ([message]) and (message) separately, otherwise the end 
isn't recognized properly.

Original comment by brammool...@gmail.com on 14 Jan 2015 at 3:58

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant