[Kommander-devel] KTextEditor in Kommander
Eric Laffoon
eric at kdewebdev.org
Thu Sep 7 11:44:12 EDT 2006
On Thursday 07 September 2006 9:37 am, Andras Mantia wrote:
> On Thursday 07 September 2006 03:10, Eric Laffoon wrote:
> > On Tuesday 05 September 2006 1:48 am, Andras Mantia wrote:
> > > Should be fixed, but for some reason here the parenthesis are not
> > > bold, while for the rest are. I have no idea why, as the rule for
> > > them is exactly the same...
> >
> > Hah, I think it's more than that if you look closer... ;-)
>
> Actually it was caused by the wrong rules which mixed up the paranthesis
> matching.
>
> > > > 2) Loop variables (@i) are not handled and I'm not sure how much
> > > > of a pain they are, but if we could at least stop highlighting on
> > > > a space after @unknown that would be good.
> > >
> > > Same bug as above.
> >
> > These seem okay now as they stop after spaces, so I'm not sure what
> > you mean by same bug.
>
> The bug was that the stopping characters (including the spaces) were not
> taken into the account due to wrong rules...
Good, now I just have to finish my system update and sed has moved and
confused the install... (sigh)
>
> > The actual issue here is that anything inside parenthesis is handled
> > as a separate entity and manages quotes consistently whereever it is
> > placed. So technically it's not quotes inside quotes as much as
> > functions with quoted text inside other functions with quoted text.
> > The reason for this is that escaping quotes, while necessary at
> > times, would be really annoying for a function based process that
> > inherently ends up nesting so many functions. So it's really about a
> > two step parse, vs one.
>
> The problem is that the same highlighting highlights bash as well. In
> bash it's not possible to have quoted text inside quoted text. And
> really Kommander is the *only* language I know which allows this. So if
> I change the rules, the bash highlighting will be broken. Sure it's
> possible to switch between pure bash and the bash+kommander
> highlighting, but I would like to have at least one working "mixed"
> highlighting scheme.
It shouldn't be that big of a deal for now, though there is one other odditity
I forgot to mention. In Kommander's function syntax an extra @ is an escape
character. So @@global(somevar) would be escaped. I'm not sure how far Michal
took this.
>
> > Everything was looking great and I can't tell you how exciting it is.
> > Then I started running across something truly odd. Have a look at
> > this... @TreeWidget1.setText(@exec(find /etc @env(CONFIG_PROTECT)
> > -iname "._cfg????_*"))
>
> Fixed, please update (and install ;-).
Yes... I figure I will have my build system fixed once I get my system fully
updated.
>
> > confuse parenthesis matching? The apparent cause seems to be
> > Kommander functions like @global( or @env(, which is what was fixed.
> > Strange...
>
> No, the problem was that the Kommander specific rules "ate" the opening
> parenthesis and Katepart didn't know that it was open, thus the
> matching pair highlighting got broken.
>
> > BTW not wanting to pull you off the work on Quanta, but given the way
> > we can easily parse functions and widgets how much work is involved
> > in auto completion?
>
> I don't know. I have plans to fix many more bugs for 3.5.5, as we have
> too much open bugreports. But it's up to you to say which one has
> priority.
>
> Andras
I really can't pull you off bugs as I've always left this to your discretion.
Hopefully in the next few weeks you can look at it again.
--
Eric Laffoon
Project Lead - kdewebdev module
More information about the Kommander-devel
mailing list