Changing file viewer and editor text display options

The built-in viewer and editor opens when you view or edit files, perform code reviews, and search for text in files. You can change the viewer and editor settings to use syntax highlighting, specify the default font and size, and set the number of spaces to use for tabs.

To change the default application for viewing or editing specific file types, see Setting file viewer and editor options.

1. Choose Tools > User Options then select the View/Edit File category.

2. Select Use 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, and XML files. Syntax styles are automatically applied based on the file type.

Note: 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.

3. Select Only use for files smaller than and enter the maximum file size to control when syntax highlighting is applied.

Large files take longer to open in code reviews when syntax highlighting is used. Set a limit to automatically disable highlighting in large files to improve performance. The default value is 1024 KB.

4. To set the default font options, click Choose Font, select any options, and click OK.

5. 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.

6. Click OK to save the changes.