NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
5.2 and TAB code compleion


Joined: 19 Oct 2007
Posts: 1
Location: Australia
Reply with quote
I installed PhpEd 5.2 as an upgrade over 5.0.1 build 5029 on Windows XP Pro SP2.
Everything works fine...except that the TAB key steadfastly refuses to insert a TAB.
I have tried turning off everything related to TABs, rebooting etc but to no avail Crying or Very sad
No problems with other applications so it isn't hardware or Windows itself.

Help!
I like the new features and don't want to go back.
View user's profileFind all posts by perrymoSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
TAB key works perfectly here, you didn't override it or assigned it to something else mistakenly?
View user's profileFind all posts by BlizzSend private messageVisit poster's website


Joined: 03 Aug 2007
Posts: 2
Reply with quote
Something is different. Code completion now kicks in.

Inside of docblocks i can no longer tab to get some spaces between the @something and the value. It seems impossible to get a correct tab in comments now anyway.

Also, how are we supposed to get something like this in the editor?
Code:

$test = 1 [tab][tab] // Does something
$test2 = 3 [tab][tab] // Does something else


I cant get a tab in code any longer.


Last edited by kreischweide on Fri Oct 19, 2007 2:33 am; edited 1 time in total
View user's profileFind all posts by kreischweideSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
I'm glad I don't have that problem, the TAB key mainly and the backwards bracket matching are irritating enough already sigh.
Hopefully they fix all of those pretty quick.
On a positive note I have to say that I really like the expanded code folding Wink

I also upgraded over build 5031 btw.
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
If enabled, TAB is used for inline code completion. See Tools->Settings->Code Insight settings->Code Completion On Tab checkbox.
Under "inline" I mean for example if you have SOMELONGNAME partially typed, it will try to complete without invoking popup. If no common sequence is found it will invoke popup.

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


Joined: 14 Jun 2006
Posts: 14
Location: Eindhoven, Netherlands
Reply with quote
Thank you! Very Happy Disabling that setting made atleast my TAB-button work as usual. Smile
But it still doesn't solve my other problem, where I can't use TAB when the code completion window is open. In versions prior to 5.0 I could.

I like the new Code Explorer en code folding btw, good job. Smile
View user's profileFind all posts by MeAngrySend private messageVisit poster's websiteMSN Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Quote:
But it still doesn't solve my other problem, where I can't use TAB when the code completion window is open

I'm not sure what you mean.

Please try the following file:

<?php
define('A_LONG1_CONST', 'some test');
define('A_LONG2_CONST', 'some test2');
define('A_LONG3_CONST', 'some test3');

?>

Then type A_ and invoke code completion, then press TAB, it's supposed to complete up to A_LONG, then if you type 1 and press TAB one more time it will finish.

Do you see any other behaviour?

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

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
We made it a bit "smarter" and tab will work as usual in most cases, except when code completion request is "predicted". In this case TAB works like command line completion in unix shell http://en.wikipedia.org/wiki/Command_line_completion

Quote:
Command line completion is a common feature of command line interpreters, in which the program automatically fills in partially typed tokens. Depending on the specific interpreter and its configuration, these elements may include commands, arguments, environment variable names and other entities. Command line completion generally only works in interactive mode.[1] Command line completion is often invoked, by default, by pressing the tab key and frequently called tab completion even when bound to a different key or key combination



Still you can turn Code Complation On Tab off on the Code Insight settings page.

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

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
What I don't get is why it also pops up when you aren't typing code.
Small example is that you just typed a line, finished it with ; and then want to TAB a few times to add comments on that line that are on the same column.
It still pops up the code completion dialog which made me deactivate it directly, even if it's the most handy accessory there is, I need my TABs in whitespaces.
Is there any reason it doesn't listen to the "min characters" option?

FYI, the tooltip for the code completion check box is identical to the Limit scope option above it, seems like a small copy/paste bug Wink

Edit: Seems the TAB thingy was also fixed in build 5210, nice Smile
The tooltip copy is still there though Wink
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Veteran

Joined: 30 Nov 2006
Posts: 186
Reply with quote
dmitri wrote:
We made it a bit "smarter" and tab will work as usual in most cases, except when code completion request is "predicted". In this case TAB works like command line completion in unix shell http://en.wikipedia.org/wiki/Command_line_completion

Quote:
Command line completion is a common feature of command line interpreters, in which the program automatically fills in partially typed tokens. Depending on the specific interpreter and its configuration, these elements may include commands, arguments, environment variable names and other entities. Command line completion generally only works in interactive mode.[1] Command line completion is often invoked, by default, by pressing the tab key and frequently called tab completion even when bound to a different key or key combination



Still you can turn Code Complation On Tab off on the Code Insight settings page.


Is this something new in 5.2?

The reason I ask is because I was writing some PHPdoc and did not understand why the TAB would not work

I wrote

/**
* VAR String
*/

And I tried to press TAB after String, and nothing happened.
If I moved the cursor one space after String, I could use TAB again.

So I was about to report it as a bug, when I saw this thread, changed the settings suggested and TAB then started to work again.

I can see some people finds this new tab thing useful, however PHPed would be the first editor to do that I think. All other editors I have tried use ctrl + space for code completion.
View user's profileFind all posts by hgrSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Quote:
The reason I ask is because I was writing some PHPdoc and did not understand why the TAB would not work

it would work if you updated to 5210 Smile

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

Joined: 30 Nov 2006
Posts: 186
Reply with quote
It was on build 5210 I discovered the problem?
Reading about all the problems there was with installation of 5209 I waited to the latest release before updating.

I really like the new features and the speed of the new version, just though it was funny that the Tab key did nothing, when I pressed it during PHPdoc writing.
View user's profileFind all posts by hgrSend private message
5.2 and TAB code compleion
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 2  

  
  
 Reply to topic