I am currently migrating from Azure Data Studio to VS Code mssql
extension as ADS was recently retired. With ADS, I was able to create a new untitled SQL file quickly through a single command or via clicking "File".
Another great thing about this in ADS is that it would use the same connection as the current sql/notebook file that you have open.
I have seen posts which change language of the file after creation or they set the file extension when saving:
Alternative way of creating new file in VS Code?
Why does VS code open a untitled file every time i create a file?
However, I would love to create a new untitled SQL file in a single command or through File -> New File -> (choose file type). Sometimes I just need to run quick SQL queries that I don't want to save.
I would also love if it's possible to have the new file the use the same connection as the previous open SQL file so I don't need to set the connection every time. Right now when I create a new SQL file and save via the new file option/command, the new SQL file requires me to manually set the db connection every time even if only one connection is open.
I am currently migrating from Azure Data Studio to VS Code mssql
extension as ADS was recently retired. With ADS, I was able to create a new untitled SQL file quickly through a single command or via clicking "File".
Another great thing about this in ADS is that it would use the same connection as the current sql/notebook file that you have open.
I have seen posts which change language of the file after creation or they set the file extension when saving:
Alternative way of creating new file in VS Code?
Why does VS code open a untitled file every time i create a file?
However, I would love to create a new untitled SQL file in a single command or through File -> New File -> (choose file type). Sometimes I just need to run quick SQL queries that I don't want to save.
I would also love if it's possible to have the new file the use the same connection as the previous open SQL file so I don't need to set the connection every time. Right now when I create a new SQL file and save via the new file option/command, the new SQL file requires me to manually set the db connection every time even if only one connection is open.
Share Improve this question edited Mar 18 at 20:53 marc_s 756k184 gold badges1.4k silver badges1.5k bronze badges asked Mar 18 at 17:56 Quinn NolanQuinn Nolan 291 silver badge3 bronze badges 1- 1 Nope, that's not how it works, but there is an Issue raised for it. – Thom A Commented Mar 18 at 18:18
1 Answer
Reset to default 0As @Thom A said it is an issue where the feature request is raised.
The workaround you can follow to resolve it is overriding default shortcuts like Ctrl+N
manually through the keybindings settings (as shown below).
After this setting you just need to select the connection from the list popped up when you create the new SQL file with ctrl+N
.