Format SQL: Ability to turn off "begin" indent

Provides intelligent code completion for SQL Server editors.

Moderators: JonathanWatts, David Atkinson, Anu Deshpande, Paul Stephenson, Michelle Taylor, Mike Upton, justin.caldicott, Aaron Law

Format SQL: Ability to turn off "begin" indent

Postby willspurgeon » Mon Jul 01, 2013 5:09 pm

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
Code: Select all
if @x < 1
begin
    set @x=1
end

over
Code: Select all
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!
willspurgeon
 
Posts: 5
Joined: Fri Jan 16, 2009 8:44 pm

Postby Manfred.Castro » Tue Jul 02, 2013 6:17 pm

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
Manfred.Castro
 
Posts: 209
Joined: Mon Apr 23, 2012 2:49 pm


Return to SQL Prompt 5

Who is online

Users browsing this forum: No registered users and 0 guests

cron