5

I want to surround some HTML code with <div> - how to do it in Eclipse with some shortcuts or macros. I do not want to repeat surrounding manually.

<p>some text</p>

I want to surround with <div> and achieve

<div><p>some text</p></div>
Chameleon
  • 9,722
  • 16
  • 65
  • 127

1 Answers1

5

Follow below mentioned steps :

  1. Select the text that you want to surround with tag.
  2. Go to 'Edit > Quick Fix' or press 'Ctrl + 1'.
  3. Double click "Surround with new element"
Rahman
  • 3,755
  • 3
  • 26
  • 43
  • Partially working but only on pure html. Html + djanog fails since unknown tags. Another problem Ctrl+1 is reformatting code - code looks more ugly than nice. – Chameleon Aug 27 '15 at 13:15