NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Improving autocompletion
Veteran

Joined: 28 Nov 2005
Posts: 144
Reply with quote
Hi,
I would suggest to change the way the items in the autocompletion ox are showed (maybe through a specific option).

I think it's useful to see items grouped logically:
1: variables defined in the current script (first the ones in the current scope and then the others)
2: functions defined in the current script
------
3: variables defined outside of the current script (required from the current script)
4: functions defined outside of the current script (required from the current script)
------
5: variables defined at global php level ($_SERVER['PHP_SELF'], etc.)
6: functions defined at global php level (fopen, fread, setCookie...)


At the moment typing "get" and then Ctrl+Space give a too big unordered list of suggestions, it's very difficult to find my function getUserInfo(); may be trying to search it is a waste of time, better to use the code explorer.... not?

other thing: in the code completion should be nice to see the constants defined with "define()".
View user's profileFind all posts by blackSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
actually, this popup "contains" all the things that might be related to current context. If you invoke it with "get" typed, popup hides all things which names do not start with get, sorts the results alphabetically and shows them. If you move cursor so for example only "ge" is on the left, it will hide only things that do not start with ge, etc. If no words on the left, the list is full and nothing is hidden. Similarly, if you continue typing and get becomes for example get_, the process starts again and you get updated list.

Quote:
1: variables defined in the current script (first the ones in the current scope and then the others)
2: functions defined in the current script


Does it make a real sense? Look, if you type $get, list will contain only variables, b'ze no functions may contain $ at the first position. Similarly, if you type "get", you won't see variables, b'ze all variables must have $ at the first position.
So variables and functions can be displayed only when you typed nothing and typing just one symbol would separate the things Smile It's either $ or not $.

Quote:
2: functions defined in the current script
4: functions defined outside of the current script (required from the current script)
6: functions defined at global php level (fopen, fread, setCookie...)

This order of things makes more sense to me.
It looks like you consider "current script functions" more important than "function outside". I'd agree that in some cases it's just fine. But in the other cases, if for example you need to call a lot of php-embedded functions, I think you'll find such scrolling to them inconvenient.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 28 Nov 2005
Posts: 144
Reply with quote
ddmitrie wrote:
actually, this popup "contains" all the things that might be related to current context. If you invoke it with "get" typed, popup hides all things which names do not start with get, sorts the results alphabetically and shows them. If you move cursor so for example only "ge" is on the left, it will hide only things that do not start with ge, etc. If no words on the left, the list is full and nothing is hidden. Similarly, if you continue typing and get becomes for example get_, the process starts again and you get updated list.

oh yes, sure, it's so.

Quote:
1: variables defined in the current script (first the ones in the current scope and then the others)
2: functions defined in the current script

Does it make a real sense? Look, if you type $get, list will contain only variables, b'ze no functions may contain $ at the first position. Similarly, if you type "get", you won't see variables, b'ze all variables must have $ at the first position.
So variables and functions can be displayed only when you typed nothing and typing just one symbol would separate the things Smile It's either $ or not $.


this is true too. But there is a bigger probability to use a variable inside the current function or script then outside; so what I suggest is to create a logical order.


Quote:
2: functions defined in the current script
4: functions defined outside of the current script (required from the current script)
6: functions defined at global php level (fopen, fread, setCookie...)

This order of things makes more sense to me.
It looks like you consider "current script functions" more important than "function outside". I'd agree that in some cases it's just fine. But in the other cases, if for example you need to call a lot of php-embedded functions, I think you'll find such scrolling to them inconvenient.


again: having a logical order where the firsts elements are probably the mostly used improve the efficiency.
View user's profileFind all posts by blackSend private message
Improving autocompletion
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