Formatting options
Last modified: September 6, 2024
To access formatting options, on the Tools menu, select Options. In the Options window that opens, navigate to Text Editor > Formatting > General.
The formatting options are grouped as:
General options
As you can see, general formatting options are grouped into two categories:
- Formatting
- Notifications
Formatting
Here you can select how your code will be formatted: immediately on paste or after you add a delimiter to a completed statement.
The Right Margin option allows the user to specify the code line length in symbols.
Note
Right Margin is a base point for formatting rules applicable for different statements, for example, Wrap condition when the margin is exceeded and Single line when the margin is not exceeded.
Notifications
In the Notifications group of options, you can choose whether to display syntax errors in the Output window and/or to show the syntax error notification window.
Note
Some functionalities are disabled and available in dbForge Studio only.
Formatting profile options
Formatting profile comprises a set of rules for how to layout your SQL. To configure formatting options or rules, do the following:
1. On the Tools menu, click Options.
2. In the Options window that opens, go to Text Editor > Formatting > Profiles.
3. Choose a formatting profile to update and click Open Selected.
4. Edit formatting options in the left-hand pane.
5. Click Save As to save the changes.
6. Click OK.
Every formatting profile has a number of rules.
Options are grouped mainly by the statement. Each group has a set of such options as Line Breaks, Indentation, and Insert Spaces.
Changes in the default state of options and their influence on statement formatting can be viewed on the right-hand pane - Formatting preview.
Search for statements or options can be conducted from the option search box. In the Search box, you can use the following keyboard shortcuts:
- Ctrl+A to select all.
- Ctrl+Left Arrow (←) to move the caret to the beginning of the word.
- Ctrl+Right Arrow (→) to move the caret to the end of the word.
- Ctrl+Shift+Left Arrow (←) to select text from the current caret position to the beginning of the current word and move the caret to the beginning of the word.
- Ctrl+Shift+Right Arrow (→) to select text from the current caret position to the end of the current word and move the caret to the end of the word.
- Ctrl+Backspace to delete the word to the left of the cursor.
Text options
Text options allow indicating Tab size and Indent size in symbols. Here you can also select to Keep tabs and Insert Spaces, as well as specify Right margin.
Tab size specifies the width of a tab character in whitespaces.
Indent size defines how many whitespaces will be put in the indented line start.
The indentation is performed with tabs or spaces depending on which option is selected - Keep tabs or Insert Spaces.
To hide/show the Text options pane, click the gear-wheel icon on the menu of the Edit Formatting Profile window.
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by Schema Compare for SQL Server.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.