Code formatting

@dsfog@dsfog Posts: 2 Bronze 1
edited December 31, 2012 6:50AM in SQL Prompt Previous Versions
I have noticed som mishaps when auto formatting my code, where perfectly sane TSQL is going off.

Most simple example I have found:
Write
DROP TABLE
With caret placed exactly after TABLE press Ctrl + Enter.
Line is now
DROTABLELE

Same mishaps are at times found for ASC and DESC keywords, but I have not identified a way to consistently reproduce these errors (nor tried to).


Setup
SSMS 2012
SQL Prompt 5.3.6.28
Connection Coloring as only experimental feature[/code]

Exported Style XML:
<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<!---->
<LayoutOptions version="1" type="LayoutOptions">
<ReservedWordsCasing>1</ReservedWordsCasing>
<BuiltInFunctionCasing>1</BuiltInFunctionCasing>
<BuiltInDataTypeCasing>1</BuiltInDataTypeCasing>
<DelimitIdentifiers>False</DelimitIdentifiers>
<IndentationAmount>4</IndentationAmount>
<UseTabs>False</UseTabs>
<ReformatExpressions>True</ReformatExpressions>
<FirstColumnOnNewLine>False</FirstColumnOnNewLine>
<CommasAtStart>True</CommasAtStart>
<MultilineSpacesAfterCommas>True</MultilineSpacesAfterCommas>
<MultilineSpacesBeforeCommas>True</MultilineSpacesBeforeCommas>
<MultilineAlignCommasWithStatement>False</MultilineAlignCommasWithStatement>
<OperatorsOnNewline>True</OperatorsOnNewline>
<OperatorsAtStart>True</OperatorsAtStart>
<IndentBeginToken>True</IndentBeginToken>
<IndentWithExpressionBrackets>True</IndentWithExpressionBrackets>
<IndentWithParameterBrackets>True</IndentWithParameterBrackets>
<IndentWithQueryBrackets>True</IndentWithQueryBrackets>
<CloseBracketsOnNewLine>True</CloseBracketsOnNewLine>
<OpenBracketsOnNewLine>False</OpenBracketsOnNewLine>
<Wrap>True</Wrap>
<WrapWidth>78</WrapWidth>
<ShortLength>15</ShortLength>
<CreateBracketsAtStartOfLines>False</CreateBracketsAtStartOfLines>
<ParameterBracketOnNewline>True</ParameterBracketOnNewline>
<CloseParameterBracketsOnNewLine>True</CloseParameterBracketsOnNewLine>
<CompactShortStatements>False</CompactShortStatements>
<SinglelineSpacesAfterCommas>True</SinglelineSpacesAfterCommas>
<SinglelineSpacesBeforeCommas>False</SinglelineSpacesBeforeCommas>
<SpacesAroundOperators>True</SpacesAroundOperators>
<SpacesAroundComparisons>True</SpacesAroundComparisons>
<FirstParameterDefinitionOnNewLine>True</FirstParameterDefinitionOnNewLine>
<SpacesAfterBrackets>False</SpacesAfterBrackets>
<LayoutSelectStatements>True</LayoutSelectStatements>
<LayoutCreateStatements>True</LayoutCreateStatements>
<QueryNewlineAfterOpenBracket>False</QueryNewlineAfterOpenBracket>
<QueryNewlineBeforeCloseBracket>True</QueryNewlineBeforeCloseBracket>
<JoinConditionsOnNewline>True</JoinConditionsOnNewline>
<AlignConditionsWithJoins>False</AlignConditionsWithJoins>
<AlignJoinsWithFrom>True</AlignJoinsWithFrom>
<IndentByKeywordWidth>False</IndentByKeywordWidth>
<ColumnsOnSingleLine>False</ColumnsOnSingleLine>
<DoNotIndentProcedureContents>False</DoNotIndentProcedureContents>
<ExecuteParametersOnSingleLine>True</ExecuteParametersOnSingleLine>
<UseSpacesInsteadOfTabs>False</UseSpacesInsteadOfTabs>
<IndentSelectSubclauses>False</IndentSelectSubclauses>
</LayoutOptions>

Comments

Sign In or Register to comment.