[Gambas-user] Change to the Gambas IDE to improve the workflow

Benoit Minisini gambas at ...1...
Tue Mar 11 21:18:50 CET 2008


On mardi 11 mars 2008, Robert Rowe wrote:
> Yes, you are correct that CTRL+Space will trigger completion in Gambas2.
> This is a key combo the VB uses but VB will also complete on the space,
> periond and left parnethesis too. I looked at the section that you
> mentioned.
>
> ELSE IF InStr("([.!", Key.Text) > 0 AND InStr(". ", $sMode) > 0 THEN
>
> It appears that it is looking for a period in the $sMode variable too.
> The $sMode variable gets assigned the value in sMode which is a
> parameter on the Open sub.

You are right. The $sMode variable just tells the context of the 
autocompletion.

"." means a point has been pressed.
" " means that the space key has been pressed.
"_" means that an underscore has been entered.
"<" means that the Backspace key has been press.
"A" means that the three first letters of a symbol have been entered.

I added "<" and "A" to the mode list above, but I can't accept the space key 
to automatically insert a completion item, as you may want to enter a 
variable named "eNDI" followed by a space, without ENDIF being automatically 
inserted instead.

Try the revison 1155, and tell me if it is better for you.

Regards,

-- 
Benoit Minisini




More information about the User mailing list