PhpStorm 6.0.1 Web Help

File | Settings | Project Settings | Code Style - SQL

settings

PhpStorm | Preferences | Code Style | SQL

settings

Use this page to configure formatting options for SQL files. View the result in the Preview pane.

On this page:

Tabs and Indents

ItemDescription
Use tab characterIf this check box is selected, tab characters are used:

    Otherwise, spaces are used instead of tabs.

    Smart tabsIf this check box is selected, PhpStorm inserts tabs for indentation and reformatting, but fine alignment to a necessary column is done only via spaces. This is done in order to preserve visual representation of the source code, when the Tab Size is changed.

    If this check box is not selected, then spaces are used for alignment if necessary.

    This check box is available if the Use Tab Character check box is selected.

    Tab sizeIn this text box, specify the number of spaces included in a tab.
    IndentIn this text box, specify the number of spaces (or tabs if the Use Tab Character check box is selected) to be inserted for each indent level.
    Continuation indentIn this text box, specify the number of spaces (or tabs if the Use Tab Character check box is selected) to be inserted at the next line in case of a construct break.

    General

    Use this tab to specify certain formatting behaviors in your code. The results are displayed in the Preview pane.

    ItemDescription
    Word CaseIn this node, specify whether the keywords, identifiers, or quoted identifiers case should change automatically. Click the right-hand column, and check the desired behavior on the menu to turn it on.

    The possible options are:

    • To upper: the elements are automatically converted to the upper case.
    • To lower: The elements are automatically converted to lower case.
    • Do not change: The case of elements is left as is.
    Identifier quotationsClick the right-hand column, and check the desired behavior on the menu to turn it on.

    The possible options are:

    • Quote: the identifiers are automatically quoted.
    • Unquote: The identifiers are automatically unquoted.
    • Do not change: The identifiers are left as is.
    New line before/afterUse these nodes to define how many blank lines you want PhpStorm to retain and insert in your code after reformatting. For each type of SQL element, select of clear the check box to the right. The results are highlighted in the Preview pane.
    Wrap insideUse this node to define wrapping style for the lengthy elements. The possible options are:
    • Do not wrap - when this option is selected, no special wrapping style is applied.

      Note

      If this option is selected, the nested alignment and braces settings are ignored.

    • Wrap if long - select this option to have lines going beyond the right margin wrapped with proper indentation.
    • Chop down if long - select this option to have elements in lists that go beyond the right margin wrapped so that there is one element per line with proper indentation.
    • Wrap always - select this option to have all elements in lists wrapped so that there is one element per line with proper indentation.
    AlignmentSelect the check boxes next to the desired elements of source code to have them automatically aligned.

    Spaces

    Use this tab to specify where you want spaces in your code. To have PhpStorm automatically insert a space at a location, select the check box next to this location in the list. The results are displayed in the Preview pane.

    Other

    On this page, specify the elements to be kept intact after code reformatting.

    ItemDescription
    Comment at first columnIf this check box is selected, the comment position at the beginning of a line of code will be preserved.

    Set From

    Click this link to reveal the list of languages to be used as the base for the current language code style. So doing, only the settings that are applicable to the current language are taken. All the other settings are not affected.

    This link appears in the upper-right corner of the language-specific code style page, when applicable.

    Click Reset to discard changes and return to the initial set of code style settings.

    See Also

    Procedures:

    Web Resources: