IntelliSense not selecting by default inside functions

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

IntelliSense not selecting by default inside functions

Postby CFI » December 28th, 2012, 9:09 am

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
CFI
 
Posts: 66
Joined: December 13th, 2012, 1:29 pm

Re: IntelliSense not selecting by default inside functions

Postby Jakub Misek » December 28th, 2012, 9:28 am

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,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: IntelliSense not selecting by default inside functions

Postby CFI » December 28th, 2012, 9:52 am

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)...
CFI
 
Posts: 66
Joined: December 13th, 2012, 1:29 pm

Re: IntelliSense not selecting by default inside functions

Postby Jakub Misek » December 28th, 2012, 10:04 am

Thanks, this seams like useful option. Will be added in a future update.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 52 guests

cron

User Control Panel

Login

Who is online

In total there are 52 users online :: 0 registered, 0 hidden and 52 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 52 guests