Announcement

Collapse
No announcement yet.

Comparing first X lines

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Comparing first X lines

    How can I configure BC to compare only first X lines
    OR make only first X lines important ?

  • #2
    Hello,

    Go to Tools -> File Formats, select your format
    Add a new Grammar element in the Grammar tab.
    Select Columns, define, and give it a name other than New Element.

    Then in your Text Compare session, go to the Session menu -> Session Settings -> Importance tab. check your new name, and uncheck everything else.

    Beyond Compare is a multi-platform utility that combines directory compare and file compare functions in one package. Use it to manage source code, keep directories in sync, compare program output, etc.
    Aaron P Scooter Software

    Comment


    • #3
      Originally posted by Aaron View Post
      Add a new Grammar element in the Grammar tab.
      Select Columns, define, and give it a name other than New Element.
      Hmmm... I do believe that genius asked about comparing the first X lines, not a range of columns. Am I missing something?
      BC v4.0.7 build 19761
      ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

      Comment


      • #4
        I think you're right.

        genius74, try following Aaron's instructions but instead of "Columns" select the "Lines" category. Mark the "or line 1" box to indicate a match at the top of the file and then set the number of lines as desired.
        Tim T Scooter Software

        Comment


        • #5
          It doesn't work ...

          Hi guys !

          Thanks for replying, but it does not work.

          I defined new text format, defined new grammar with first 5 lines.

          But there is only option to make it important in session settings,
          what exactly should I uncheck ? I don't have "everything else"

          Comment


          • #6
            I haven't tried the recommended steps, but "Everything else" can be found from within a text compare, under Session Settings, Importance tab.
            BC v4.0.7 build 19761
            ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

            Comment


            • #7
              The Importance tab in the Session Settings of an open Text Compare session should list the grammar elements that File Format has defined.

              If you check the box, it is Important.
              If you uncheck the box, it is Unimportant.

              Under the list of defined items, there are a few more options for general text and whitespace. "Everything Else" can be unchecked, and describes text that does not fit into a defined grammar element (listed above).

              Does that help clarify? You need to be in a Text Compare, and using your defined File Format.
              After that is setup, you can update the Session Defaults (dropdown in the lower left; or from the Home screen).


              Sorry about suggesting Columns; I accidentally misread your request.
              Aaron P Scooter Software

              Comment


              • #8
                Thanks a lot , it works fine.

                Comment

                Working...
                X