NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
<?php ?> and echo tags insertion buttons in toolbar


Joined: 29 Aug 2007
Posts: 39
Reply with quote
A small thing perhaps, but i think it would be handy to have a button to wrap selected text with the php open and close tags.

If I grab a snippet of code from somewhere, it's be great to paste it, highlight and then hit a button to wrap it with <?php and ?> tags.

Likewise for echo. Similar to the previous implementation, you type what you want to show, hit the button and it puts an echo in front of it, and if we're not in php tags already, add those too.

Or maybe this can already be done?

Again, not a major thing, but I think it'd be a time saver.


Cheers
View user's profileFind all posts by StryksSend private message
Veteran

Joined: 26 Dec 2006
Posts: 253
Location: Phoenix, AZ
Reply with quote
This fits in nicely with the larger-scale feature that's been requested before of an improved template system. Such a system would support multiple variables within the template that you can quickly switch amongst to easily fill them in, the ability to insert any selection into the template, smart indentation handling, the ability to assign keyboard shortcuts or insert via the mouse, and much more. Basically, something approaching the systems available in TextMate and BBEdit.
View user's profileFind all posts by bobwilliamsSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
If I grab a snippet of code from somewhere, it's be great to paste it, highlight and then hit a button to wrap it with <?php and ?> tags

You can do it right now Smile
Just create a lang-neutral code template of <?php|?> and enter it whenever you need to surround selected code with php tags.

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


Joined: 08 Sep 2006
Posts: 72
Location: Poland
Reply with quote
dmitri wrote:
Just create a lang-neutral code template of <?php|?> and enter it whenever you need to surround selected code with php tags.

LOL... I didn't know I could do that in PhpED (:
View user's profileFind all posts by bartheqSend private message
Veteran

Joined: 26 Dec 2006
Posts: 253
Location: Phoenix, AZ
Reply with quote
Hey, I never saw the language-neutral option - that's great to know about! That makes something like this request (and more) feasible.

Quick question, though: is there a way to bind the template to a dedicated shortcut, so that I don't have to press ctrl-J and maneuver through what could be a long list?
View user's profileFind all posts by bobwilliamsSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
no, shortcuts aren't supported at the moment. We have this request in the plans.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
<?php ?> and echo tags insertion buttons in toolbar
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