NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] code completion annoyance


Joined: 23 Aug 2005
Posts: 51
Reply with quote
hi

there's one thing of current implementation of code completion that makes it really dangerous (for me atleast) to use it:
when i insert functions/classnames/constants and use code complete it replaces text on the right with inserted word

for example there's a following line of code

echo strtoupper('test');

i want to wrap strtoupper into another function, say str_pad

i put cursor right before strtouppert, start typing str_, then code completion appears and
i select str_pad from it. instead of just adding "str_pad(" function it adds "str_pad" & deletes text on the right (strtoupper)!
that makes work of adding/inserting code much more diffuclt as i had to be sure that i dont delete anything with
code completion, in fact i had to stop using it at all in these cases Sad

is there any way to disable this behaviour?

alexei
View user's profileFind all posts by alexeiSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
Actually there is nothing wrong with code completion.
Suppose you have
STRTO|
where | symbol denotes the cursor location
and want to complete the code by selecting strtoupper() from the popup, in this case Code Completion must replace your word with strtoupper(),
while selecting a word from popup you may shift cursor left to see for example all functions starting with "str". etc, and again Code Completion must replace your word with what was selected in the popup.
Similarly, you might want to replace strtoupper() with something else and once again, you put the cursor in the word and select new code in the popup which would replace current word in the editor.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 23 Aug 2005
Posts: 51
Reply with quote
yes, i thought it is not a bug Smile but is it easy/possible to have "replace word" feature optional?
so i could use just "add the rest of the word" function as it was in older versions of phped.
zend studio has this feature optional too Smile

alexei
View user's profileFind all posts by alexeiSend private message


Joined: 23 Aug 2005
Posts: 51
Reply with quote
Hi ddmitrie

I'm at the point of buying a php IDE and this issue with code completeion can really affect my decision.
As i said, zend studio has an option to disable code replacement and it cant be a really
difficult to add it to phped either.

I think that ability to type word then move cursor back couple of chars to see
list of functions starting from STR instead of STRTO is not needed at all.
Basically it is the same as i'd move cursor using backspace and then get a list of functions
for the remaining of the word (STR)... OK, i believe people like it and use it Smile
But it is really BAD when inserting code because it deletes old code!
This is absolutly unexceptable and is the best way to break things,
in this situation NO code completion is better then such code completion....

My question is do you have any plans to add an option allowing to disable REPLACE behavior
of code completion any time soon? If yes please tell how long it might take
(next build, next hot fix, next minor version, next major version).
I dont think that it is single-customer-wants feature..

Please, just give me this option or reassure me it is coming and i'll buy phped straight away Smile

Alexei
View user's profileFind all posts by alexeiSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
Quote:
My question is do you have any plans to add an option allowing to disable REPLACE behavior

It's already scheduled for the version 4 Update Pack #1.
Can't tell when it will be released, hopefully in the first decade of November.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 23 Aug 2005
Posts: 51
Reply with quote
great! i'm buying phped then Smile
View user's profileFind all posts by alexeiSend private message
auto-completion replaces text to the right


Joined: 28 Jun 2006
Posts: 92
Reply with quote
dmitri- rather than posting a new thread, I found that this two-year old one addresses my question precisely.

You made reference to an option being made available to turn off the unexpected behavior that code-completion replaces text to the right of the cursor-- where is the option found?

thanks
View user's profileFind all posts by bcswebstudioSend private message


Joined: 23 Aug 2005
Posts: 53
Reply with quote
you're need to turn off tools->settings->editor settings->Clear when inserting template.
It affects both inserting code templates and inserting code completion.
View user's profileFind all posts by stappelSend private message


Joined: 06 Apr 2007
Posts: 48
Location: Gdansk, POLAND
Reply with quote
Thanks a lot!
View user's profileFind all posts by NatanielSend private messageVisit poster's website


Joined: 28 Jun 2006
Posts: 92
Reply with quote
perfect, thanks!
View user's profileFind all posts by bcswebstudioSend private message
[resolved] code completion annoyance
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