TAB not same as ENTER in autocomplete in 4.6.3 |
Veteran
|
I am sorry, I know I am missing the point - why would TAB key complete the line ?
|
||||||||||||
|
|
Because according to the 4633 email, TAB is now a completion character for code-insight along with the pre-existing use of the ENTER key.
Or, more specifically: Code insight will show you both $thing1 and $thing2 as options. You can select either one with the cursor up/down keys, but TAB will not complete either of them. Only ENTER does that. BUT: If code insight only found 1 match (instead of the 2 in this example), TAB would complete it. |
||||||||||||
|
Veteran
|
I see now, thank you. Actually it is working as designed, tab only completes the line if there is only one entry on the list
|
||||||||||||
|
|
Sorry to say, but that's not very helpful.
I don't know about the reasons behind that design, but the release notes in the 4.6.3 news made it sound as though the TAB key worked just like the ENTER key for code completion. That would have been useful. What's the use of having TAB complete the line when only 1 item remains in the list? If it takes a lot of typing to make the list only have one entry, you have defeated the purpose of using the cursor key to find what you want. As in the example above, I would have to type $thing1 or $thing2 to make the variables unique. Now the need for code completion is moot, as I already typed the whole variable name myself. |
||||||||||||
|
|
agreed.. TAB should operate exactly as ENTER in a multiple select autocomplete.
|
||||||||||||
|
Site Admin
|
Initial request was to have TAB operating the way we implemented it, e.g. when only one item remains in the dropdown.
Personally, I see no advantages to have TAB operating equally to ENTER. What if we think about a different approach? Just for example, let me explain how TAB works in SHELL (it's all for Windows adicts because all unix guys know it well, I think) Let's adapt scenario to php: For example you may have just two letters in php area: "my" and invoke code completion using TAB. It will add mysql immediately upon tab is pressed. No dropdown is shown because all the items in the code completion list filtered by "my" start with mysql (including all mysql_xxx functions, mysql and mysqli_xxx functions) - it's the leftmost common sequence, so you have no other choises but mysql, so it's added without dropdown. Then you proceed with specifying what you need after mysql by typing for example _cl, in this case you have quite tiny list of functions: mysql_client_encoding and mysql_close. If you press TAB now, you'll see the list because at least one item in this list has different letters after _cl (otherwide it would add all common letters without showing dropdown). Any thoughts if this would be more usable than Enter? |
||||||||||||
_________________ The PHP IDE team |
|
Thanks for opening the floor for a discussion.
I love your idea of auto-completing as much as matches exactly when TAB is hit like seen in sh, but ONLY IF the following is kept: The drop down should still show and should autofilter as you complete more text as normal. This would very effectively eliminate the need for arrowing up/down in the dropdown, but the option would still be there to do so. In fact, this would be even more effective in that it could let you write obnoxious variable lists like: $email_var1 $email_var2 $email_var3 $email_var4 ... by first typing out "$email_var1" then you type out "$em[TAB]" and magically, "$email_var1" would appear with TAB, you backspace one, hit "2" then you type out "$em[TAB]3", "$em[TAB]4" ad infinitum. Great idea, Dmitri. But please please keep the drop-down list of candidate completion as well. |
||||||||||||
|
|
OK this explanation makes some sense for TAB completion operating in a different manner than I expected. I understand what you were aiming at. Now however, that isn't what happens for me. Is there a setting to enable that? If I type "my{TAB}" I get "my" and a TAB. It does not type "sql" after the "my" |
||||||||||||||
|
|
right-- he has recognized your issue post and, in addressing it, he is proposing an additional behavior (in addition to our original desire to have TAB act exactly as ENTER as we were hoping).
Try to weed through my previous reply to dmitri-- I think this is a behavior that would satisfy both our original request and add new functionality. Hmm.. On second visit there is a problem here-- TAB cannot act as both ENTER and "mostly-complete" in conjunction with a dropdown, would it? . . If this is the case, and if it can't be resolved, I believe I would prefer to see the originally requested behavior, namely that TAB acts exactly as ENTER. |
||||||||||||
|
Site Admin
|
Why? Do you expect any problems? |
||||||||||||||
_________________ The PHP IDE team |
|
It dawned on me that when you type and a list of autocomplete candidate items appears, the first item will already be selected. If you hit TAB (and hoping here that TAB can still act == ENTER), then the first item on the list (not the first partial match as you had suggested in your prev. post) would be selected.
TAB would necessarily have to behave differently from ENTER and could not be a hybrid sh-style and ENTER-select-style combo. It is solvable by making clear option in the pref's: TAB acts as ENTER in auto-complete or TAB acts as sh-style partial complete (or something)... |
||||||||||||
|
TAB not same as ENTER in autocomplete in 4.6.3 |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by