I would like to be able use some sort of C++ style commenting for Microsoft Word.
E.g. If I have
// line of text
the entire line should be a comment and should appear in a different colour.
Same goes for:
/*
text block
*/
I would want text block to be in a different colour than my main text.
Another feature that would be nice but not necessary for me to have is some sort of a way to quickly strip all the comments.
I have no idea how this could be done, if possible.
Any ideas?
Thanks.
Answer
If your comments are delimited /*
and */
then stripping them and delimiters all in one go is possible with Search for (/\*)*(\*/)
and Replace with nothing. /{2}*^l
should locate an entire line beginning //
and ending with a line break (may look like a one but is an el).
Having located text in this way it can be “deleted and then reinserted” with changed formatting (eg font colour) by replacement with ^&
in the Replace box formatted to suit.
Note that the above searches and replacements would require Use wildcards being ticked.
Attribution
Source : Link , Question Author : Community , Answer Author : pnuts