Search code examples
intellij-ideaintellij-14

Surround with - multiple selections


I currently have to surround some scriptlets in a lot of jsp pages with a custom tag. The first jsp took me over an hour and there's a lot more to go. I made a live template for the custom tag. The technique I'm currently using is just searching for <% and surround scriptlet by scriptlet with this tag using the CTRL-ALT-T shortcut.

Now since I can't find anything on jetbrains about this, does anyone know of a better, faster technique to just wrap every occurence of a scriptlet within a given jsp page with my tag? This would make my work 10 times faster.

I don't have to replace every single scriptlet so a replace-all wouldn't work.


Solution

  • Perhaps Structural Search and Replace might be helpful.