Turning off Eclipse XML editor's comment autocomplete

W

wimxa

When I open the XML file and open the comment (by typing <!--) it
automatically adds a closing tag: -->

This is fine until you really want to comment something already
existing. For example:
<tag1>
<tag2>
</tag2>
</tag1>

will be turned into:
<!-- -->tag1>
<tag2>
</tag2>
</tag1>

by typing !-- after the first >. Any way to disable this? Ctrl+space
is nice, but I don't like this automatic behavior.
 
V

voorth

When I open the XML file and open the comment (by typing <!--) it
automatically adds a closing tag: -->

This is fine until you really want to comment something already
existing. For example:
<tag1>
<tag2>
</tag2>
</tag1>

will be turned into:
<!-- -->tag1>
<tag2>
</tag2>
</tag1>

by typing !-- after the first >. Any way to disable this? Ctrl+space
is nice, but I don't like this automatic behavior.

In the preferences panel, go to the "Web and XML/XML Files/Templates"
entry.
There is a "comment" template with the value "<!--${cursor}-->" that
can be changed to a more friendly form.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top