
Set the maximum number of elements on one line.Ĭhop if long: move each value to a new line if text exceeds the configured line length.Don't copy/cut the current line when invoking the Copy or Cut action with no selection The Place comma option works only if the Wrap subqueries option in the WITH clause section is set to Chop or Chop if long.
#DATAGRIP AUTO FORMAT MARGIN CODE#
The In the middle option joins two lines of code on one line. To configure the line length, open settings Control+Alt+S, navigate to Editor | Code Style, and type the necessary length in the Hard wrap at N columns field. Wrap if long: break a section of text into lines so that each line fits the configured line length.

Under elements: place the closing parenthesis under aligned elements of a clause.Ĭhop if long: move each value to a new line if text exceeds the configured line length. Under opening: place the closing parenthesis under the opening parenthesis. To begin: move the closing parenthesis to a new line with the last element of a clause. Wrapped indented: add an indent and move all members of the clause to a new line.Ĭhange the position of the closing parenthesis.Īt the end: place the closing parenthesis at the same line with the last element of a clause. Wrapped aligned: align and move all members of the clause to a new line. Wrapped unindented: move all members of the clause to a new line without adding an indent. Same line aligned: align all members of the clause, keep the first member on the same line with a parenthesis. Select On the same line to keep the opening parenthesis on the line with the keyword.Ĭhange the position of elements in relation to the opening parenthesis. Move clause elements that follow VALUES on a new line.Īlign or indent the opening parenthesis under the first keyword on the line. The As in common option means that the behavior of the selected option must duplicate the behavior of the analogous option in the Common section on the Queries tab. Move clause elements that follow INTO on a new line. Move INTO and clause elements that follow INTO on a new line. Move all section elements under the section main keyword (a header).

Keep section elements under section header To enable this option only for subqueries, select Subqueries only. The length of a statement that will be collapsed is determined automatically by DataGrip. If you want to disable a new line after the comma when the To begin option is enabled, clear the Line breaks checkbox on the Wrapping tab. This option works only if you have more than three cases in a single context. The Auto option will move the third occurrence of the comma to the beginning. For example, you have three occurrences of a comma: two commas go at the beginning, one comma is at the end.

The Auto option analyzes the surrounding context and calculates the most suitable place for a comma. Move a comma ( ,) to the beginning ( To begin) or to the end ( To end) of a code line. Move clause elements to a new line ( New line) or leave them on the same line ( Same line).
