PreviousNextTracker indexSee it online !

(137/161) 3522090 - XML: Wrap selection in a tag

Hi there,

I primarily work with HTML and XML. I find jEdit to be an amazing tool, in particular how sidekick parses and displays the markup language.

One feature that I would dearly like, is a way for me to:

i) Wrap selected lines with tags
ii) Wrap a selection with tag

1) Wrap selection with an arbitrary tag

Often time, I'm required to take multiple lines and wrap them with an arbitrary tag. Right now, I make use of beanshell macros to do this, but they are hardcoded to specific tags (like <li> or <p>). I would like to do this without having to type into a dialog box.

See image 01_jetbrains_IDEA_wrap_in_tag.png

2)



Submitted taitoh - 2012-04-27 - 19:01:52z Assigned kerik-sf
Priority 5 Category XML
Status Open Group None
Resolution None Visibility No

Comments

2012-04-27 - 19:07:00z
taitoh
Oops...

2) I would like to have the option to do this across multiple lines. This is great for making individual paragraphs or list elements. I have macros that do it, but some editors on OS X (like Textmate, espresso) do this out of the box.

See image 02_Wrap_selected_lines_in_tag.png

Thanks,

Tai
2012-04-27 - 19:23:39z
daleanson
Looks like a nice feature for the XML plugin.
2012-04-27 - 20:27:24z
taitoh
Thanks Dale,

I'd love to see it implemented.

-T
2013-07-31 - 19:25:11z
ezust
+1 to that!!
2013-07-31 - 20:13:24z
sjakob
Have you tried the XInsert plugin? Not sure about arbitrary tags, but it looks like it might not be too difficult to create your own custom tag libraries.
2013-08-01 - 04:38:19z
ezust
Actually, now that you mention it, this might be a templates or supertemplates or xinsert feature rather than something that needs to be added to XML plugin, but Ia m not familiar enough with those other plugins to say for sure.

In my earlier comment, when I said +1 to that, I thought this request was for reformatting words (as in word wrap) for the contents between a tag (instead of using the traditional paragraph separation criteria that jedit's built in reformat paragraph uses) but after looking at the images you attached, I realize your request is not about word wrap, but "tag wrapping".

Attachments

2012-04-27 - 19:01:53z
taitoh
01_jetbrains_IDEA_wrap_in_tag.png

Image of Jetbrains IDEA wrapping a selection with an arbitrary tag

2012-04-27 - 19:07:40z
taitoh
02_Wrap_selected_lines_in_tag.png

Image of Espresso with Wrap selected lines in tag.