SECTION 2 Editor Insights

Tip 9: Compare Two Files Line by Line (Diff)

In version-controlled files you will notice marks in three colors: Deleted, added, and modified lines are highlighted in red, green, and blue, respectively.

Highlight color

Difference

Red

Deleted lines

Green

Added lines

Blue

Modified lines

Figure 4 shows the color coding in context. The color-coded bars along the editor’s left edge allow you to track differences between your local copy and the last repository version. Navigate quickly to modified lines by clicking the corresponding marks in the error stripe to the right.

FIGURE 4: Marks representing removed lines, added lines, and modified lines

Click the vertical bars along the left edge for a pop ...

Get 100 NetBeans™ IDE Tips & Tricks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.