Format SQL: Ability to turn off "begin" indent

I don't like to indent my "begins" in procs, while's, if's, etc and need to be able to turn this off.

Ex: I prefer
if @x < 1
begin
    set @x=1
end
over
if @x < 1
    begin
        set @x=1
    end

I've seen some references to an XML file where that can be tweaked, but I need to set it directly in a style file that can be shared across the DBA team.

Thanks!

Comments

  • The option is not currently in UI but you can modify it in:

    c:\Users\<your login>\AppData\Local\Red Gate\SQL Prompt 5\RedGate_SqlPrompt_Format_Layout_LayoutOptions.xml

    Change element IndentBeginToken:

    <IndentBeginToken>False</IndentBeginToken>

    This equivalent setting is also also in the style file so you can modify the style file and share the style file with other members of your team.

    If you would like to request a feature to make this option available from the UI you can vote for this existing feature request in our uservoice forums.
    http://redgate.uservoice.com/forums/944 ... dent-begin
    These forums are actively monitored by our development team and allow our users to request features and vote on them.
    If a feature receives a significant amount of votes or is deemed to have merit development may include the feature in a future release.
    Manfred Castro
    Product Support
    Red Gate Software
Sign In or Register to comment.