Script Idea - Close Tag, Select Tag, etc.

Started by scunliffe, February 08, 2011, 05:13:03 PM

Previous topic - Next topic

scunliffe

I write a lot of code in some form of SGML (e.g. HTML, XML, XSL, SVG, JSP, PHP) and thus I write a lot of tags.

There are 5 scripts I created for another editor that I would love to be able to use/re-create in Hippo Edit.


  • Close Active Tag
  • Move to Next Tag
  • Move to Previous Tag
  • Select to Next Tag
  • Select to Previous Tag

1.) Close Active Tag:
This worked by closing the current tag I was editing... e.g. If I wrote:

<select name="foo">

and my cursor was anywhere after the open angled bracket, pressing a hotkey would run my script... which would search backwards for the open angled bracket, then search forward for whitespace, save the tagname as a variable, search forward for the closing angle bracket, then insert after it...

</{variableValue}>

Thus closing whatever tag I was editing... regardless if it was a random XML/XSL tag, a JSP tag, or whatever.

2.,3.,4.,5.) Similarly, these would move my cursor (optionally selecting) to tag start/stop positions.

To quote Martha... its a little thing, but a good thing.

If there were some way to accomplish the same kind of thing in HippoEdit, I would love it.

alex

Hi Steve,

thanks for suggested help! It should be possible in month or less. At least with dev version ;)

Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]