Page 1 of 1

IntelliSense not selecting by default inside functions

PostPosted: December 28th, 2012, 9:09 am
by CFI
Hi,

I have a strange behavior of IntelliSense:
When I am inside a function and I start typing the auto-complete pops up, but nothing is preselected, so to accept I need to press e.g. the down arrow first.
Outside a function it works as expected and I can e.g. type "pu"+Space and it auto-completes to "public ".
Also at the "second level" it works again - e.g. if I want to type "$this->Xml->Root" inside my function it works fro Xml and Root, but not for $this, so I can/need to type $ + ArrowDown + Enter + ->X + ->R + Enter instead of $t + ->X + ->R + Enter. Same for local variables I need to type $v + ArrowDown + Enter to get $variable instead of $v + Enter.

Can I change that somehow or is this a bug?

regards

Re: IntelliSense not selecting by default inside functions

PostPosted: December 28th, 2012, 9:28 am
by Jakub Misek
Hi,

This behaviour is by design. If you are typing "$...", IntelliSense has to allow you to type new variable name. By preselecting an existing variable, Visual Studio would autocomplete in cases you don't want to.

If you type a variable name without leading $, preselection works.

Also if there are more good matches in IntelliSense list, nothing is selected (only first good match is highlighted). This could be changed probably.

Thanks,

Re: IntelliSense not selecting by default inside functions

PostPosted: December 28th, 2012, 9:52 am
by CFI
Ok, thanks for the information.
Typing it without the $ actually works and autocompletes including the $ - even if not as nice as I am used to with C# this will work for now.

Thanks!

P.S.: It would be great to have an option to disable this behaviour as I personaly would like it more to hit ESC to cancel autocompletion the few times I create new variables then to hit ArrowDown every time I use them (which happens MUCH more often)...

Re: IntelliSense not selecting by default inside functions

PostPosted: December 28th, 2012, 10:04 am
by Jakub Misek
Thanks, this seams like useful option. Will be added in a future update.