How to ignore identical lines commented out in one file but not the other?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bkaskel
    New User
    • Nov 2015
    • 1

    How to ignore identical lines commented out in one file but not the other?

    I commented out multiple lines of C code in one file using /* ... */ and have them uncommented in my other file.

    I would like to be able to see that the only differences are the lines with added "/*" and "*/". If I make all grammar items UNIMPORTANT then I can almost do this, except the /* and */ lines are not considered important. Enabling just "Comments" marks the entire block as different.

    If I disable the C/C++ file format support then it basically does what I want. Is that my only option? I guess what I want is to have the C/C++ grammar coloring while having the files compared as if they were plain text files.

    Thanks.
  • Chris
    Team Scooter
    • Oct 2007
    • 5533

    #2
    To change the comment behavior, open Tools > File Formats.
    Select the C/C++ file format.
    Go to the Grammar page.
    Select Comment=Text from /* to */.
    Click the gear button to edit the element.
    Change the element name from Comment to CommentBlock.
    Click OK, then save the file format.

    When you compare files in the Text Compare, click the Rules toolbar button. Now you can check CommentBlock to make it important but leave Comment unchecked to treat single line // comments as unimportant.

    As an alternative, you can also delete the /* to */ grammar element to make comment blocks be treated as default text.
    Chris K Scooter Software

    Comment

    Working...