[Gambas-user] I just noticed some nifty editor behaviour

Benoit Minisini gambas at ...1...
Sun Mar 30 15:24:34 CEST 2008


On samedi 29 mars 2008, richard terry wrote:
> Not sure how long  this has been a feature of the editor, but I've only
> just noticed it, so just in case other dummies like me havn't picked up on 
> this, I'll describe the behaviour. I've been picking up my mouse to move
> around and found in this case I don't have to
>
> If your doing a case statement and type:
> CASE "
>
> Then the editor puts the next set of quotation marks in for you.
>
> Also I just  noticed that even when the cursor is inside of the brackets,
> that hitting  <enter> dosn't split the line - and additionally , puts the
> next set of "" marks, ahead of the cursor position on the next line.
>
> I guess this utility could be extended to things like;
>
> Type Case (then the editor puts an End Case a couple of lines down.
> Case Select Case "whatever" and hit <enter> and the editor could put the
> Case   " " there automatically.

??

>
> In any case, what exists at the moment is great.
>
> Ive started to write down a list of these editor features as I stumble on
> them. Perhaps if anyone wanted to contribute some How to use the editor
> tips, they could mail them to me and I could put them into some sort of
> HTML file for general use.
>
> Regards
>
> Richard
>

I don't understand what you want to add, but the " is automatically added just 
because the parser got a beginning quote, starts to parse a string token by 
waiting for the ending one, didn't get it, but adds the string token anyway 
in its internal tree. When the parser rewrites the line of code for the 
editor, it automatically adds the ending quote when rewriting the string.

Regards,

-- 
Benoit Minisini




More information about the User mailing list