Code Snippets input |
|
45 views and not a single person thinks this is a good idea?
|
||||||||||||
|
|
IT would be cool if multiple | characters can be used in a snippet, and each time i press CTRL+| it would advance to the next input location. This way if i create a snippet that contains 5 | characters in different locations i can rip through each of them and type in the required text to complete the snippet.
Just me 2 cents though. |
||||||||||||
|
|
agreed.. some more power in the code snippets could be useful.
|
||||||||||||
|
Veteran
|
How about %1 %2 etc, thats quite a common identifier for replacements, windows uses %something% etc.. Using | seems a bit weird!
Ofcourse if you wanted to use %1 in your code, you'd need to escape it like this %%1 so... (not real code, just an example)
|
||||||||||||||
|
|
I agree to the %1 %2 approach. This does make the snippet editor more powerful, and more complex.
The "popup" needs to be configurable so the author of the snippet can define how many input fields are required and labels for them. I'm sure this is a no-brainer to the developers of PhpED though. Question is, will they even consider it? Meanwhile, I have started a C# project that utilizes the script functionality to popup a customizable window with inputs (textbox,radio,combobox,checkbox), labels and of course OK and Cancel buttons. Features it has now: * GUI editor (Very quirky and buggy at the moment) * Snippet template editor (very simple, no syntax highlight or such) Basically, I assign ctrl+alt+J (or anything else) to trigger my script. Lets say I type "newprop" in the editor and press my shortcut combination, it will then trigger the script, passing "newprop" as an argument. The program looks for a snippet named "newprop" and executes it, with it's associated GUI, then returns the processed template. The template looks pretty much the same I had in my first post, but rather than having just @INPUT@ I can name them like @NAMEOFPROPERTY@ and @PROPERTYTYPE@ etc... So, by naming my input field in the GUI editor "NameOfProperty" I know exactly where it is injected in the template (@NAMEOFPROPERTY@). Any thoughts? Ideas? I will make it available for download (both binary and source) if people are interested and I feel somewhat satisfied with it |
||||||||||||
|
|
I'm very interested =)
|
||||||||||||
|
Site Admin
|
we have this feature request in our dev plans, but its priority is not too high, so it is still waiting for its time
|
||||||||||||
_________________ The PHP IDE team |
|
It's been 8 years, I don't know, has anything been solved? |
||||||||||||||
|
Site Admin
|
Piotr, if it was the only feature on our plate, we'd have it done long ago. Obviously, our highest priority is php.
|
||||||||||||
_________________ The PHP IDE team |
Code Snippets input |
|
||
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