Comparing Two Files in the IDE
- In the Explorer, select two files.
Control-click on the second file to select it.
- Right-click and choose Tools
Diff from
the contextual menu.
- In the Visualizer combo box, select how to view the differences:
- Graphical Diff Viewer. The graphical two-paned Diff Viewer uses background
highlight colors to display the
differences between the two files. By default, changed lines are highlighted in blue,
added lines are highlighted in green, and removed lines are highlighted in red.
- Textual Diff Viewer. The textual Diff Viewer shows you the diff output
in text so that you can copy and paste the output into a file or into an email.
- In the Engine combo box, select a diff engine:
- To close the Diff Viewer pane and return to the Source Editor,
right-click the Diff Viewer's tab at the bottom of the pane
and choose Close from the contextual menu.
Configuring the Diff Viewer
You can change the diff settings in the Options window.
To change your diff settings:
-
Choose Tools
Options.
-
In the Options window, expand IDE Configuration
Server and External Tools Settings.
See the Diff Settings node to set your default diff engine and default diff visualizer.
Expand the Diff and Merge Types node to set:
-
Diff command options (for example,
diff -b {0} {1}
)
-
The number of lines of
context around differences in the textual Diff Viewer
- The default
background highlight colors for changed text
Legal Notices