A few years ago SQL Prompt added a command palette to let you search the commands available. This is similar to the same concept in Visual Studio Code, ADS, and various other tools. This post looks at how to get to this tool in SSMS.
This is part of a series of posts on SQL Prompt, which is an amazing productivity tool from Redgate Software.
Opening the Palette
You can also open the Command Palette from the menu. In the SQL Prompt menu, it is the first item. You can also see there is a shortcut of ALT+S below here.
When I click this, I’ll see the full list of palette commands. This is a large window, and across the top I can filter things. In the complete list, you see various things: objects, snippets, and refactoring commands. We also have the Prompt behavior settings as well.
For example, I could look for things with “brackets”. I see a few things that are relevant. I can pick any of them if I want that apply to my code or change the behavior of the tool
Adding to the Menu
If you can’t remember the shortcut. or don’t want to use the menu, you can add this as a button in the toolbar. Here’s the easy way. When you installed SQL Prompt (or the Toolbelt), there is a Redgate toolbar added. Mine looks like this:
I clicked the “Add or Remote buttons ” and got a list of buttons on this toolbar. I can click “Customize if I like. That opens the dialog below.
Now click “Add Command”. That gives you a list of items in all the menus in SSMS. Pick the SQL Prompt menu on the left (first one). Then scroll down and find “Open command palette” in the right side. Select it and click OK.
Now you have this in your toolbar.
Now one click, and you have the palette.
FWIW, you can use this trick to add any menu item to a toolbar that you want.
UPDATE: A comment asked about partial matches, and you can see I see partial matches for “Addre”.