I have an HTML file with quite many comments. They are useful but I'd like to hide them when I'm working with file to make it easier to read.
Have you come across a plugin that can do that? How about some other editor than Notepad++?
vbs files was that Notepad++ was using REM as comment mark instead of ' (single quote). Luckily it's pretty easy to modify comment marks for various languages in Notepad++ Open Notepad++ language config file: C:\Users\<user name>\AppData\Roaming\Notepad++\langs.xml.
I came across the same problem some time ago. One thing you can do is put your comment lines between braces like:
{ //Hidden comments
//Word.Document doc = wordApp.Documents.Open(ref outputFile, ref nullobj, ref nullobj,
// ref nullobj, ref nullobj, ref nullobj,
// ref nullobj, ref nullobj, ref nullobj,
// ref nullobj, ref nullobj, ref nullobj,
// ref nullobj, ref nullobj, ref nullobj,ref nullobj);
}
So you can collapse it and see it this way:
{ //Hidden comments
In Notepad++, choose HTML from Language menu. And if you have comments like this:
<!-- here are some html comments
sdfasdfadsf
asdfasdf
-->
You will be able to fold them just fine. you can use Fold All to collapse the whole html content, and then start unfolding from there (to only parts that you want to see).
Use alt+h to hide lines.
The following describes the setup of code-folding/comment-folding for in-line and multi-line comments on an existing language file using NPP.
**WARNING: Clicking the X at the top-right will close the document, so click Undock in step 4, to close the UDF dialog, not the X. You can recover a closed document in the File drop-down menu.
**WARNING: You may need to restart NPP to see the UDF in the Language drop-down menu; so, don't get flustered.
**WARNING: In step 4: I needed to clear the Open and Close texfields and then re-add the data before this worked.
->
Define your language... in the drop-down menus. alt + h may decrease horizontal scrolling by reducing line depth. alt + h maximizes editor-zooming FOV.
Code-folding improves editor-zooming FOV.
Non-hidden comments are unrelated items; hidden comments are code explanation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With