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



Deleted lines


Added lines


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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.