On 6 April 2010 12:11, Søren Hauberg <[email protected]> wrote: > tir, 06 04 2010 kl. 09:17 -0400, skrev Carnë Draug: >> On 5 April 2010 22:22, Søren Hauberg <[email protected]> wrote: >> > tor, 01 04 2010 kl. 17:21 -0400, skrev Carnë Draug: >> >> On 20 March 2010 18:32, Søren Hauberg <[email protected]> wrote: >> >> > It would be nice if you could also highlight the function name coming >> >> > after the '@', so when I write '@sin' all for characters get the same >> >> > colour. This should, however, only happen when the following characters >> >> > is a legal function name. Specifically, I think we should highlight >> >> > anonymous functions different, so when I type '@(x)' only the '@' gets >> >> > highlighted. >> >> >> >> What do you think if it highlights any word that comes right after the >> >> @ ? It would still not highlight anonymous functions but it would any >> >> user-made function. >> > >> > I'm guessing this is how the parser works, so that sounds reasonable to >> > me (I assume you define "word" as something that starts with an >> > alphabetical character and only contains alphanumerics or underscores) >> > >> > Søren >> > >> Not really. It's up to me to define that. I was thinking something >> like this (which it seems to fit on what you said) >> >> \b@([A-Za-z][A-Za-z0-9_]*)?\b >> >> What do you think? > > That looks reasonable to me. I guess it should also be possible for the > function name to start with an underscore, so perhaps > > \b@([A-Za-z_][A-Za-z0-9_]*)?\b > > instead? > > Søren
Oh! That's right, they can also start with an underscore, I forgot about it. I tried it and got it working after removing the \b's. Attached is my latest version of the lang file. See if it works fine for you. I'll submit it again to the gtksourceview developers. Carnë Draug
octave.lang
Description: Binary data
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
_______________________________________________ Octave-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/octave-dev
