NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Feature proposal to match some other PHP IDE functionality


Joined: 02 Jun 2011
Posts: 8
Location: Serbia
Reply with quote
Hi there.

First of all I have to say that I am very pleased with what PHPEd has become after version 6, especially with so many useful features added like object literal notation for JavaScript etc.

However I would like to propose several features which I found in one of the IDEs I have been using for a very long time (I won't name it here though its Open Source) until I realized that aside from DBG there are exactly zero competent PHP debuggers out there. For the purpose of this post I will simply call that particular IDE "The Solution" Very Happy

1) "The Solution" has an excellent system for setting and moving between bookmarks. You see in the current implementation of PHPEd the bookmark system is for me personally unusable because a) some of the shortcuts do not work because they are assigned to other functions (i.e. CTRL+SHIFT+number only works from number being 6 or higher), b) its sometimes pretty hard to remember what was the exact number assigned to the required bookmark.

I would like to recommend a system to add/remove unnumbered bookmarks (yes a bookmark system without numbers) by simply using a unique shortcut combination like lets say CTRL+SHIFT+M. In addition two additional shortcuts would be used for traversing bookmarks or in other words heading to the next/previous bookmark. These could be lets say CTRL+SHIFT+, (previous bookmark) and CTRL+SHIFT+. (next bookmark). I believe that this would be much more efficient despite the fact that there could possibly be situations where traversing (pressing keys) would have to be done a couple of times.

2) In "The Solution" I find the possibility to click on a particular URL or resource inside the code tremendously helpful. In other words if there is a "require" statement inside the code clicking on the resource next to it (filename, URL) is in so many situations very helpful. Essentially clicking on any resource inside HTML, PHP, CSS, JavaScript code should open that particular resource in a separate IDE window (of course if the resource is of type which can be opened).

3) Another great feature of "The Solution" is the ability to contextually autocomplete paths. I.e. when I write HTML code and start typing a resource name for lets say the src attribute of the img tag the IDE should be able to recognize the name of the folder or file I am trying to use and follow the path. If for example I try to write images/dispatcher/scene-1.jpg the IDE should be able to recognize parts of that URI and offer autocompletion.

4) A better support for catching PHP errors. It would be nice to have support which would catch accidental assignments inside if conditions or lets say uninitialized variables. I know that the assignment error (using = instead of ==) inside an if statement is really a beginners mistake but I was surprised to see that an error like that slid past me (and IDE too) and I let the code with that error reach production servers.

5) Better integration with versioning systems like SVN etc. Now I believe that this would not be so easy to achieve but seeing support for at least some kind of versioning in the last couple of revisions I actually wished there is something like a solution on that field that "The Solution" provided. You see in "The Solution" there is an easy integrated way to compare current code with lets say any commit revision or easily search for modifications etc. Now this feature is not that important to me because I use shell extensions like TortoiseSVN but in my opinion it would be good to have them some day.

That would be it for now. I do hope you take into consideration what I wrote here because I think that some of the points (at least the first four) would seriously affect productivity in a positive manner.

Thank you.
View user's profileFind all posts by holodocSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
Hi,

You can change the shortcuts for bookmarks if you find there is a conflict on the keys. Ctrl+Shift+number works using 1 to 9 for me Smile But not ctrl+shift+0 - I don't know what that does but it doesn't appear to be anything to do with PhpED.

An alternative to bookmarks is to use @todo and todo: to mark things to go back to. It can be shortcutted with a keypress and very useful. Then you can view the To-Do list and double-click to jump.

You can right-click a filename in a string and use Open file at cursor and you can of course shortcut that. With web applications I often find that things like include paths are used for requires/includes, so it is difficult for PhpED to know where the file is.

Auto-completion for paths could be useful, but again will often suffer from PhpED not knowing where to look, particularly if using root relative paths which many web apps do. One exception to that might be with CSS, where a relative path is always relative to the CSS file (and possibly also the place I would find auto-completion most useful!) Bear in mind you can drag & drop files from the PhpED Workspace onto the editor for various files and PhpEd makes a guess as to how to insert that filename, but always with full paths instead of relative.

I often use assignment operators inside if statement conditions, because that allows me to get a value and test it at the same time, then immediately use it without getting it again.

Code:
if ($_html = function_to_prepare_html()) {
  echo $_html;
}


It is common practice in all the frameworks that I use.

Detecting uninitialised variables is something that I really would like. With PHP it can be so easy to miss something like that.
View user's profileFind all posts by plugnplaySend private message


Joined: 02 Jun 2011
Posts: 8
Location: Serbia
Reply with quote
Guys thank you so much for implementing so many proposals (in fact all of them) from my original post in this thread. The new unnumbered bookmarks system in PhpEd 9.0 is a tremendous help and seeing that the editor finally supports working copy change color indicators in the gutter is wonderful.
View user's profileFind all posts by holodocSend private message
Feature proposal to match some other PHP IDE functionality
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