Changing code review view options

When reviewing files in code reviews, you can change how to display differences between file versions, apply syntax highlighting, select a different font, and change the tab width.

To change how files are displayed, click the Options button when viewing a file in a code review and select an option.

You can change the default settings for diffing file versions in code reviews in user options. See Configuring diff/merge application settings. You can also change the default settings for syntax highlighting, font, and tab width. Keep in mind that changes to these user options also apply to viewing and editing files in other areas of Surround SCM. See Changing file viewer and editor text display options.

Ignore options

When comparing file versions, you can hide differences in letter case and white space to reduce the number of changes displayed.

To ignore differences, click the Options button and choose any of the following options.

Option Select to:
Ignore case differences Ignore differences in character case.
Ignore white space Exclude all white space differences (spaces and tabs) in a line.
Ignore white space changes Exclude only additions or deletions to existing white space in a line.

Differences output options

When comparing file versions, you can change how to generate the diff results.

To change the differences output, click the Options button and choose one of the following options.

Option Select to:
Normal differences Show differences between versions using the normal diff.
Minimal differences Try to show a smaller set of differences than the normal diff. May be slow.
Fast differences Try to show differences more quickly than the normal diff. May be the best option when comparing large files with small groups of scattered changes.

Syntax highlighting

You can apply syntax highlighting to display specific text in different styles and colors. Surround SCM supports syntax highlighting in ASP, C, C#, C++, CSS, HTML, Java, JavaScript, OBJC, OBJC++, Perl, PHP, Python, Ruby, TypeScript, and XML files. Syntax styles are automatically applied based on the file type.

To apply syntax highlighting, click the Options button and choose Syntax highlighting.

Surround SCM uses KDE Advanced Text Editor (Kate) style highlight definition files, which are installed in the syntaxhighlighting directory in the Surround SCM application directory. If highlighting errors occur for a supported file type, review the errors.log file in this directory to troubleshoot. You can also create and install custom Kate highlight definition files for other file types, but Perforce does not support these files.

Font

You can change the font, style, and size used to display text in files.

1. Click the Options button and choose Font.

The Select Font dialog box opens.

2. Select any options.

3. Click OK to save the changes.

Tab width

You can change the number of spaces used in tabs in files.

1. Click the Options button and choose Tab width.

The Set Tab Width dialog box opens.

2. Enter or select the number of spaces to set as the Tab width.

You can enter a value between 1 and 99. The default value is 8 spaces.

3. Click OK to save the changes.