Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

My Weekly NetBeans Tip (2): Comment/Uncomment XML Tags

DZone's Guide to

My Weekly NetBeans Tip (2): Comment/Uncomment XML Tags

· Java Zone
Free Resource

Managing a MongoDB deployment? Take a load off and live migrate to MongoDB Atlas, the official automated service, with little to no downtime.

My tip for this week is similar to my tip from last week. Last week I showed how to surround a selection of Java code with an editor fold. Now I will show how to surround a selection of XML tags with the uncomment tags. When you complete the steps in this tip, then whenever you select XML tags, you will automatically see the small yellow tip with one hint, for surrounding with uncomment:

When you select that hint, you will see this:

     

  1. Go to Tools | Options | Editor | Code templates.

  2. Select XML in the Language
  3. Click New, enter "un" as the abbreviation, then enter the following code as the expanded text:

    <!--
    ${selection line}${cursor}-->

  4. In the Description tab, enter "Uncomment", and click OK.

Now it will work like shown above. The tip is based on my previous tip. Hope you like it!

MongoDB Atlas is the easiest way to run the fastest-growing database for modern applications — no installation, setup, or configuration required. Easily live migrate an existing workload or start with 512MB of storage for free.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}