Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse shortcut to comment selection in an XML file

Tags:

I am looking for a way to comment the current selection in an xml file in eclipse (STS 2.3.2). ctrl+/ gets seems to get ignored when editing XML.

Google left me on my own.

like image 470
gbegley Avatar asked Jun 11 '10 19:06

gbegley


People also ask

What is the shortcut for commenting in XML?

I use the (Ctrl+Shift+,) shortcut to comment out selected XML all of the time.

How do I comment multiple lines in XML in Eclipse?

PDT allows you to quickly and easily comment and uncomment code by selecting a line or a block of text and tagging it as a comment. Comments can be added to single lines of code (Ctrl + /) or blocks of code (Ctrl + Shift + /).

How do you comment multiple lines in XML?

If you are using Eclipse IDE you can comment out lines in an XML file by highlighting them and press Ctrl+Shift+c.

Can you comment out XML?

Syntax. A comment starts with <! -- and ends with -->. You can add textual notes as comments between the characters.


2 Answers

Ctrl-Shift-C, or something... some combination of two modifier keys and C :-)

like image 124
dty Avatar answered Sep 18 '22 01:09

dty


Use

Ctrl + SHIFT + L which will open a list of all major shortcuts for eclipse. 1. ForSingle line comment Ctrl + / (Forwards Slash) and

2. Single line uncomment Ctrl + \ (Backslash)

3. For Multiline comment Ctrl + Shift + / (Forwards Slash) and

4. Multiline uncomment Ctrl + Shift + \ (Backslash)

SOURCE : answered by Hardik Mishra in --> Eclipse comment/uncomment shortcut?

like image 37
Bhimbim Avatar answered Sep 17 '22 01:09

Bhimbim