Wednesday, February 1, 2012

Re: Syntax matching

It's very interesting!
Thanks a lot.

Mathieu

2012/1/31 Ben Fritz <fritzophrenic@gmail.com>


On Jan 30, 11:38 am, mfc_alpha <mathieu.ma...@gmail.com> wrote:
> Hello !
>
> I've been looking around and I can't find a solution to my issue.
>
> I have a simple langage having 2 functions.
> BashRule and PythonRule.
>
> They both have similare signature.
>
> BashRule(type, comment, bashCode)
> and
> PythonRule(type, comment, pythonCode)
>
> It looks possible to have the bash coloration used for the 3rd
> argument of BashRule and python coloration for PyhtonRule.
> What I am missing is how to match each arguments to have proper
> coloration for each other.
> e.g.
> type get Statement coloration
> comment set Comment coloration
> and bashCode get bash coloration.
>
> May be I have been looking in the wrong direction or I want to do too
> much at one time ...
>
> Thanks for any information !
>

This looks like a good application for:

http://vim.wikia.com/wiki/Different_syntax_highlighting_within_regions_of_a_file

I see a note in the comments that I meant to go back and look at a bug
in the script...I'm not sure if it's still applicable or not, possibly
the script won't work as-is, but the concept is what you want if I
understand your problem correctly.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment