I love my snippets in SQL Prompt. Adding some snippets can make work go so much quicker. I add new ones all the time, based on the tasks I’m doing and I find that code can almost write itself.
SQL Prompt 7 was just released, and it added a neat feature to the suggestions that I really appreciated. You can now add your own placeholders for code. How does this work? Let me show you.
Let’s imagine that I want to quickly view a table and update a column. I build a snippet like this:
Notice that I’ve added “tblnm” as a placeholder inside of two dollar signs. This is my custom value. It’s not a parameter, but rather a placeholder.
I can set a default value if I’d like.
Now when I start typing, I see my snippet appear.
I hit tab and then I get my snippet. The cursor is where I specified with the $CURSOR$ placeholder that was built in. However my custom placeholder has a list of the objects available that fit here.
If I select one, I get my code. Note that the default value was inserted above.
Very cool.
Now I can adjust my snippets with my own placeholder that makes sense to me, and have intellisense pop up right away.
Another keystroke or two saved.
Filed under: Blog Tagged: Redgate, SQL Prompt, syndicated