Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change auto-format for Transact-SQL code in Visual Studio 2017?

How do I stop Visual Studion 2017 form auto-formatting my T-SQL code and changing the case of keywords, functions, etc? I want to keep the code exactly as I type it. The only relevant option I see is under Editor - SQL Server Tools - IntelliSense - Casing for built-in functrion names, which does not seem to do anything (I changed it to Lower case, restarted the IDE, but it still converts them to upper case). I did not find anything relevant under the T-SQL90 and U-SQL, and I do not see any other T-SQL specific settings (I'd expect something like Transact-SQL, but there is no such option). Any idea?

like image 900
Alek Davis Avatar asked Apr 28 '26 19:04

Alek Davis


1 Answers

Here is the first place which can't be easily found without using the search bar. Also, it's not language specific either unfortunately.

Search for 'format' and turn off 'format as you type' option Here is the 2nd place I'm aware of

Search for 'pretty' and turn off reformatting Hope this is helpful -- if you find a SQL specific way to avoid the annoyance please post a response to my answer.

like image 114
Matthew Erwin Avatar answered Apr 30 '26 23:04

Matthew Erwin