Is there an inverse of "surround with" for XML/HTML code?

This seems like a basic XML/HTML refactoring, but I can't find where it would be.

Say you have a <div> block around some markup and you want to remove that <div>, but keep the markup that had been inside the <div>. Sort of the inverse of 'surround with'.

Thanks,
Chris

3 comments

Hello Chris,

"Code | Unwrap/Remove..." action (Ctrl-Shift-Del) should do that for you.

This seems like a basic XML/HTML refactoring, but I can't find where
it would be.

Say you have a <div> block around some markup and you want to remove
that <div>, but keep the markup that had been inside the <div>. Sort
of the inverse of 'surround with'.


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Ah, that seems to be available in 9.x.
Is there something similar for release 7.x? I have an older project that I haven't upgraded to 9.x as I think that would require moving it to a more recent version of Grails, and upgrading the Grails plugins, Config.groovy, etc.

Thanks.

0

I think that feature was new in 9.x (http://blogs.jetbrains.com/idea/2009/11/unwrap-code-constructs-in-javascript-actionscript/).

As a workaround try hitting ctrl+w a few times to select everything inside
the

, then ctrlx, ctrlw, del, ctrl+v. You could run the last bit as
a macro.

Ah, that seems to be available in 9.x.
Is there something similar for release 7.x? I have an older project
that I haven't upgraded to 9.x as I think that would require moving it
to a more recent version of Grails, and upgrading the Grails plugins,
Config.groovy, etc.
Thanks.



0

Please sign in to leave a comment.