You can force facelets to ignore <!-- --> comments by adding the following text to web.xml file:
(I'm not sure, if that is what you're looking for?)
The other way is to nest the components inside ui:remove.
You can use <ui:remove> along with HTML/XML comments as follows:
<ui:remove><!-- <tags you want to remove/> --!></ui:remove>
This way you get the behavior you want while still allowing your editor to highlight this section of code as commented. This way you don't need to alter your web.xml file nor add the context parameter.