NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
alternate key for code insight selection


Joined: 28 Jun 2006
Posts: 92
Reply with quote
I would like to see an option to override ENTER as code completion selection with TAB. Perhaps this would be cleanest under keyboard shortcuts "code insight".
View user's profileFind all posts by bcswebstudioSend private message


Joined: 30 Jan 2007
Posts: 34
Reply with quote
I would also like to see this as well.

I can see several keys as options to auto complete for code insight: tab, comma, space, enter, open and close parenteses, etc.

Imagine having a function:

Code:
function foobar($longVariableName, $someOtherVariable) {
// some code
}


It would be nice to be able to type:

Code:
$firstInputValue = 1;
$secondValue = 2;
$x = foo$firs, $seco);


and have it autocomplete the whole thing because of the matching. Breaking it down:

- Typing "$x = foo" would cause codeinsight to present the match list showing the foobar() function.
- Typing the "$" would autocomplete the function name with the open parenthesis, as well as printing the "$" that was typed.
- Typing "firs" would present the match for firstInputValue.
- Typing the "," would autocomplete the variable "firstInputValue", as well as printing the "," that was typed.
- The space just types a space.
- Typing "$seco" would present the match for "$secondValue"
- Typing ")" would complete the variable "$secondValue", as well as printing the ")" that was typed. (unless the ")" is already on the screen)
- of course, typing the ";" just types the semicolon.

*POOF* you typed very few characters, but ended up with:

Code:
$x = foobar($firstInputValue, $secondValue);
View user's profileFind all posts by rgagnonSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8351
Reply with quote
Quote:
$x = foo$firs, $seco);

in 4633 you can autocomplete with tab, like below

$x = foo<tab>$fir<tab>, $sec<tab><right arrow>;

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 30 Jan 2007
Posts: 34
Reply with quote
dmitri wrote:
Quote:
$x = foo$firs, $seco);

in 4633 you can autocomplete with tab, like below

$x = foo<tab>$fir<tab>, $sec<tab><right arrow>;


Nice addition, but version 4632 is the downloadable version.
View user's profileFind all posts by rgagnonSend private message
Veteran

Joined: 30 Aug 2006
Posts: 116
Reply with quote
I'm running 4633 now, may I ask how to use the TAB for code completion? Hitting Tab still inserts a tab character.
View user's profileFind all posts by rudderSend private message


Joined: 30 Jan 2007
Posts: 34
Reply with quote
Is see that 4633 does in fact use tab to complete, but not in the same manner as the enter key.

The tab key won't complete anything unless it is a unique item in the auto-completion list.--- Looks like a bug
View user's profileFind all posts by rgagnonSend private message


Joined: 30 Jan 2007
Posts: 34
Reply with quote
rudder wrote:
I'm running 4633 now, may I ask how to use the TAB for code completion? Hitting Tab still inserts a tab character.


Rudder, it should insert a tab character, unless the code-insight auto-completion box is up with selections for you.

For example:

Code:
$thing1 = 1;
$thing2 = 2;


When you type:

Code:
$thi


Code-insight will show you two options: $thing1 and $thing2. You SHOULD be able to cursor to either of them, and hit TAB or ENTER to have it finish writing the variable for you.

The problem is that TAB will NOT autocomplete unless it is the only option in the box. ENTER will work though.
View user's profileFind all posts by rgagnonSend private message


Joined: 28 Jun 2006
Posts: 92
Reply with quote
good observation.. I'm on 4633 and was confused why TAB didn't do anything new for me, either.
Thanks for the clarification-- will patiently await a fix/update.
View user's profileFind all posts by bcswebstudioSend private message
Veteran

Joined: 30 Aug 2006
Posts: 116
Reply with quote
Great report rgagnon! I'm hoping to see a quick fix if dmitri doesn't mind Razz. I was looking forward to this update Smile.
View user's profileFind all posts by rudderSend private message


Joined: 30 Jan 2007
Posts: 34
Reply with quote
Bug was opened in correct forum for tracking.

tab-not-same-as-enter-in-autocomplete-in-4-6-3-t2970.html

Moderator: Can you lock this thread?
View user's profileFind all posts by rgagnonSend private message
alternate key for code insight selection
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic