SQL Server Management Studio has been the backbone for writing queries and managing SQL Server databases for a long time now. I’ve been using SSMS for well over a decade.
A new kid on the block - Azure Data Studio - is gaining popularity. This IDE has been around for a couple of years now and is a close relative to Visual Studio Code. And with the possibility of plugging in extensions such as GitHub Copilot, I’ve recently completely switched to Azure Data Studio.
In this blog, I’ll highlight some of the features of Azure Data Studio and suggest some key binding changes which I did make the transition from SSMS to Azure Data Studio easier.
Familiarize yourself with F1
Not unlike Visual Studio Code, virtually all commands, actions and settings can be done in Azure Data Studio via the F1 menu. If you want to do something and you don’t see a button - always press F1.
Tab display size
This may be a personal preference - I always ensure tabs are back to their original 4-increments. In Azure Data Studio, press F1 and search for Change Tab Display Size. You can set to 4 here.
Object info (sp_help) via ALT-F1
By default, object info of the selected object is bound to Alt-F1
in SSMS and Alt-F2
in Azure Data Studio.
Press F1, search for ‘Preferences: Open Keyboard Shortcuts’. Search for the command ‘workbench.action.query.shortcut1’. Double-click the entry and hit Alt-F1
to set it to match SSMS.
Don’t accept autocomplete on Enter
The autocomplete in SSMS is a combo where a value is chosen with the key Tab
. Using Enter
has no effect on the autocompletion by default, unless the arrow keys are used to browse through the options.
By default, in Azure Data Studio, a value is selected in the autocompletion and chosen when using either Enter
or Tab
.
This can be quite frustrating when switching to Azure Data Studio. To change this behavior, press F1, search for Settings and turn off the ‘Accept suggestion on enter’ feature.
Alternatively, you can remove the Keyboard Shortcuts entry for the command ‘acceptSelectedSuggestion’ with Keybinding Enter
.
You will not be able to choose a suggestion after selecting a suggestion via the Up and Down keys with Enter either anymore. You will have to use Tab.
Extra vertical cursors
In SSMS, you can use Alt-Shift-Up
and Alt-Shift-Down
to create extra cursors.
In Azure Data studio, by default this is done using Ctrl-Alt-Up
and Ctrl-Alt-Down
.
Using Alt-Shift-Up
and Alt-Shift-Down
will duplicate lines instead. Remove the entries for the commands ‘Copy Line Up’ and ‘Copy Line Down’.
You can then rebind the ‘Add Cursor Above’ and ‘Add Cursor Below’ commands to Alt-Shift-Up
and Alt-Shift-Down
to match SSMS.
Note that there are some differences. In SSMS, the cursors would simply introduce spaces when navigating in a line that was ended. In Azure Data Studio, the cursor will be at a different position per line instead.
Extra cursors using the mouse
While the way extra cursors work takes some getting used to, this can also be quite powerful. For instance, you can use ALT-Click
to introduce multiple cursors at various locations in the text to edit the text at the same time.
Extra cursors via Ctrl-D
Another way to create multiple cursors is in find-and-replace scenarios. Double-click or manually select a piece of text and use Ctrl-D
once or multiple times to select more additional occurrences of this text in the document. All text can then be replaced at once.
Mastering this will make life a lot easier.
GitHub Copilot
Lastly, I want to note the option to use GitHub Copilot in Azure Data Studio. This subscription-based plugin will without a doubt significantly boost productivity of any developer.
This code completion AI has turned Tab
into the most used button on my keyboard. Read more about it here.
Closing
I hope this blog has been helpful for veterans of SSMS which are new users of Azure Data Studio. If you have any follow-up tips and tricks, suggestions or questions, I’d love to hear in the comments.
And yes, I only used light mode for this blog - dark mode is the best ;)
Happy coding!