Trying the IndentBeginToken format option and found an issue
DaveB
Posts: 11
I typically don't indent begin statements and so I started hunting through your xml and found the file FormattingOptions.xml and the formatting option IndentBeginToken. This does just what I want; however, when I set the value to False, the contents of my stored procedures indent unexpectedly. In order words, when I set IndentBeginToken to false, my begin statements no longer indent, as I hoped, but the first begin statement of my stored procedure does indent, similar to how the "Indent contents" option works, which I always leave off.
It would be nice if the schema block did not indent when this setting is changed.
It would be nice if the schema block did not indent when this setting is changed.
Comments
To recap:
1. Set IndentBeginToken to False in the RedGate_SqlPrompt_Format_Layout_LayoutOptions.xml file.
2. Uncheck "Indent contents" under "Schema statement"
3. Run formatting and contents Do indent
4. Check "Indent contents" and rerun formatting and contents do Not indent
-Dave
Is it working as per your expectation now?
Do you need any help with this (I am bit confused )?
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
If I set IndentBeginToken = False and DoNotIndentProcedureContents = True, my stored procedure contents are indented.
If I set IndentBeginToken = False and DoNotIndentProcedureContents = False, my stored procedure contents are NOT indented.
This means that the DoNotIndentProcedureContents logic is backwards when IndentBeginToken = False.
-Dave
Can you let me know the issue you are having and what exact formatting you need I will try replicating it at my end?
After investigating I can either log a bug or feature request for you (if needed)?
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
CASE 1:
PROBLEM:
This causes the contents of a stored procedure to be indented. It should not.
CASE 2:
PROBLEM:
This causes the contents of a stored procedure to not be indented. It should be indented.
If you set IndentBeginToken to True, then DoNotIndentProcedureContents works as expected.
-Dave
I have forwarded your issue to development guys.
They will have a look at it.
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com