Edit online

Format and Indent (Pretty-Print) Multiple Files

Oxygen XML Editor provides support for formatting and indenting (pretty-print) multiple files at once. This action is available for any document in XML format, as well as for XQuery, CSS, JavaScript, and JSON documents.

To format and indent multiple files, use the Format and Indent Files action that is available in the contextual menu of the Project view or from the Tools menu. This opens the Format and Indent Files dialog box that allows you to configure options for the action.

Figure 1. Format and Indent Files Dialog Box

The Scope section allows you to choose from the following scopes:

  • All opened files - The pretty-print is performed in all opened files.
  • Directory of the current file - All the files in the folder of the currently edited file.
  • Project files - All files from the current project.
  • Selected project files - The selected files from the current project.
  • Specified path - the pretty-print is performed in the files located at a specified path.

The Options section includes the following options:

  • File filter - Allow you to filter the files from the selected scope.
  • Recurse subdirectories - When selected, the pretty-print is performed recursively for the specified scope. The one exception is that this option is ignored if the scope is set to All opened files.
  • Include hidden files - When selected, the pretty-print is also performed in the hidden files.
  • Make backup files with extension - When selected, Oxygen XML Editor makes backup files of the modified files. The default extension is .bak, but you can change the extension as you prefer.