Perhaps you could replace all newline characters by some special character and then work on the remaining single line by using a regular expression (<!--.*-->). Replace the special character by a newline afterwards.
I guess you could do all this quite easily by using the Simple Script Plug-In. You can't use regular expressions then, but DeleteBetweenTags( "<!--", "-->" ) or similarly.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can hide the body of individual comments by clicking the [-] box in the margin preceding the start of the comment or pressing <Ctrl-Alt-F> with the cursor in a comment.
You can hide all level N comments using View: Collapse the Level: (level N), but this has the side effect of folding all xml tags at that same level.
To quickly collapse all comments, and only comments, at all levels, the only way I know is with a macro:
1. Use the Find dialog to find the search string "<--", then click Close to close the Find dialog.
2. Record the macro
<Ctrl-Alt-F> <F3>
3. Play macro to end of file
Of course, there may be other, simpler ways that I don't know about.
Regards.
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Could someone please let me know if it is possible to have all comments sections of an xml that have
<!-- and everything in between -->
hidden?
Eg:
<!--
This is a remark
for an xml file.
-->
I have looked at Textfx viz but cannot see how it would be possible.
Thanks and regards
motiv8d
Perhaps you could replace all newline characters by some special character and then work on the remaining single line by using a regular expression (<!--.*-->). Replace the special character by a newline afterwards.
I guess you could do all this quite easily by using the Simple Script Plug-In. You can't use regular expressions then, but DeleteBetweenTags( "<!--", "-->" ) or similarly.
bump.. Anyone able to help with this?
Can this be done with Notepadd++?
You can hide the body of individual comments by clicking the [-] box in the margin preceding the start of the comment or pressing <Ctrl-Alt-F> with the cursor in a comment.
You can hide all level N comments using View: Collapse the Level: (level N), but this has the side effect of folding all xml tags at that same level.
To quickly collapse all comments, and only comments, at all levels, the only way I know is with a macro:
1. Use the Find dialog to find the search string "<--", then click Close to close the Find dialog.
2. Record the macro
<Ctrl-Alt-F> <F3>
3. Play macro to end of file
Of course, there may be other, simpler ways that I don't know about.
Regards.
Greg
Hi Greg
Thanks but it doesnt work like that on my xml files.
The - mark is next to the section headings eg:
- <Section1>
and no '-' next to the comments area so collapsing anything will conly collapse code. eg:
<!-- My Section1 !-->
- <section1>
<default></default>
</section1>
<!-- More comments !-->
- <section2>
<default></default>
</section2>
Anyone else?
Tia