Red Gate forums :: View topic - Format SQL: Ability to turn off "begin" indent
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Prompt 5
SQL Prompt 5 forum

Format SQL: Ability to turn off "begin" indent

Search in SQL Prompt 5 forum
Post new topic   Reply to topic
Jump to:  
Author Message
willspurgeon



Joined: 16 Jan 2009
Posts: 5

PostPosted: Mon Jul 01, 2013 5:09 pm    Post subject: Format SQL: Ability to turn off "begin" indent Reply with quote

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:

if @x < 1
begin
    set @x=1
end

over
Code:

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!
Back to top
View user's profile Send private message
Manfred.Castro



Joined: 23 Apr 2012
Posts: 205

PostPosted: Tue Jul 02, 2013 6:17 pm    Post subject: Reply with quote

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/94413-sql-prompt-feature-suggestions/suggestions/2343465-autoformat-should-not-indent-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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group