[Gambas-user] Snippets bug

B Bruen bbruen at ...2308...
Thu Nov 13 01:28:01 CET 2014


On Wed, 12 Nov 2014 22:40:38 +0100
Jørn Erik Mørne <epost at ...3323...> wrote:

> Hi!
> 
> I have these two snippets:
> 
> prb
> Private $b${1:VariableName} as Boolean
> prc
> Private $c${1:VariableName} as Collection
> 
> The first, prb, works as expected. But with the prb the initial c gets 
> selected in addition to VariableName.
> 
> -- 
> Kind regards
> 

Interesting but weird. The expansion macro works fine if the trigger string is something else, e.g.
prf
Private $c${1:VariableName} as Collection

then on the other hand if it is "prc" then I get a different expansion result from you. (It indents the line and leaves the cursor just before the P in Private). What is even stranger is that if I change the expansion string to something else for "prc" then I get a different result, for example
prc
Public $c${1:VariableName} as Collection
then in using the tab key everything from the "V" in VariableName is selected

But at the end-of-the-day, I'd suggest you use different trigger strings, I have tried 
vc
Private $c${1:VariableName} as Collection
vb
Private $b${1:VariableName} as Boolean
vi
Private $i${1:VariableName} as Integer
vx
Private $h${1:VariableName} as Object
vv
Private $v${1:VariableName} as Variant

and they all behave as you would expect.

hth
Bruce

-- 
B Bruen <adamnt42 at ...626...>




More information about the User mailing list