Customize formatting profiles

dbForge Studio for PostgreSQL provides one default formatting profile. The tool allows you to create a new profile, edit formatting options and rules for your SQL document layout, add a profile from your computer, and/or activate it.

The guide describes how to:

Create a formatting profile

1. On the Tools menu, select Options.

2. In the Options dialog that opens, navigate to Formatting > Profiles.

3. On the Profiles page, click Create New.

4. In the dialog that opens, specify the following profile details and click OK.

  • Enter the profile name.
  • Select the profile from which you want to copy the settings for the new profile.
  • Specify the location at which the new profile will be saved.
  • The Set Active option is selected by default. If you do not want to make the profile active, clear the checkbox.

Options for SQL formatting dialog

The created profile will be displayed under Your Profiles. If you activated the profile, it will be highlighted in bold.

Customize the formatting profile

Every formatting profile has a set of rules and options, which are grouped mainly by the statement.

1. On the Tools menu, select Options.

2. In the Options dialog that opens, navigate to Formatting > Profiles.

3. On the Profiles page, click Open Selected.

4. In the Edit Formatting Profile dialog that opens, edit formatting options:

  • In the left-hand pane, there is a list of statements supported by the tool, which you can expand to make the changes. You can also select the statement to include it in the profile. To exclude the statement from the profile, clear the corresponding checkbox.
  • In the right-hand code editor, you can view and edit the selected option.
  • Under Text Options, you can do the following:
    • Tab size: Specify the width of a tab character in whitespaces.
    • Indent size: Define how many whitespaces will be put in the indented line start.
    • Keep tabs or Insert Spaces: Select how to perform indentation.
    • Right Margin: Specify the right margin.

Edit formatting profiles

Using the toolbar controls, you can do the following:

  • Expand all option groups: Expand all option groups.
  • Collapse all option groups: Collapse all option groups.
  • Show text options: Hide/show the Text options pane.
  • Show whitespaces: Show whitespaces in the code editor.
  • Reload sample: Show the original code sample for the selected option.
  • Format text: Format text for the selected option in the code editor.

You can search for statements or options in the Search box. Start typing the name, and the matching options will be highlighted in the left-hand pane.

5. To save the changes in the selected profile, click Save. To create a new profile, click Save As, specify the profile name and location where it will be stored, activate it (if needed), and then click OK.

Note

You can change the formatting profile for the whole SQL query or certain segments of code as follows:

In a SQL document, right-click the SQL script or selected code segment that you want to format, and then select Format > Active Format Profile > and set the corresponding profile.

Share formatting profiles

1. On the Tools menu, select Options.

2. In the Options dialog that opens, navigate to Formatting > Profiles.

3. Right-click the body of the window and select Show in Folder.

Share formatting profiles

4. Copy the profile that you want to share.

5. Open or create the folder that you want to share, and paste the profile into it.

6. Notify your team about the name and location of the folder with the profile.

Alternatively, on the Formatting > Profiles page, right-click the profile that you want to share and select Copy File Path for sharing.

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for PostgreSQL.
All Features

All features

Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for PostgreSQL?