views:

96

answers:

1

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.

+1  A: 

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

dty
Yes, Ctrl-Shift-C. Here's how I checked (so you can look this sort of thing up in future...). Press Ctrl-Shift-L to key the key help window, then press it again to go the the keys preference page. In the edit box type "comment" and scan down the list. From here, there's a bit of guesswork, but the one you're looking for is the one that's active in Structured Text Editors
dty
Apparently CTRL+/ and CTRL+C (also with the shift modifier for BLOCK comments) both work in XML files. However, none of them seem to work when the XML file is opened with the IvyDE ivy editor. Oh well, no big deal, I just opened with the XML editor and every thing works.Thanks.
gbegley
Danny, I did try that first, but thanks for the verifications. I expected the structured text comment command to get it done, and was confused when it did not. Is this common in eclipse for a special editor such (as IvyDE) to mess up structured text commands?
gbegley
Yeah, unfortunately it's a side-effect of the plug-in architecture. There's nothing to stop contributed editors from defining their own default key bindings. Of course, you could always go and edit them!
dty