Create more $...$ placeholders for snippets
I would like to see additional placeholders for the snippet manager. For example $DBNAME$, $SERVER$, $PASTE$ (already suggested). A format option for $DATE$ and $TIME$ would also be nice (e.g. $DATE(mm/dd/yyyy)$ $TIME(hh:mm:ss24/hh:mm:ssA/hh:mm)$, etc.).

We’ve released SQL Prompt 6 which includes several new placeholders.
-
Jermy commented
Also $SELECTED$ to be replaced with the current selected text in editor
-
Doug commented
Acutally, the intent would be when the saved snippet was brought into SSMS, any $(PASTE) placeholder in the snippet would be replaced by the contents of the clipboard. Thus if I had a snippet with the code:
SELECT ITEM, SUM($PASTE$) AS $PASTE$
FROM myTable
GROUP BY ITEM
HAVING $PASTE$ > 0defined as 'si', if I copied 'JanuarySales' into the clipboard and expanded the snippet 'si', it would expand as
SELECT ITEM, SUM(JanuarySales) AS JanuarySales
FROM myTable
GROUP BY ITEM
HAVING JanuarySales > 0 -
Doug commented
I've been clipped in my ars a time or two :-)
-
Brett Phipps commented
Have you guys ever tried arsClip?
-
jbelina commented
This would be great, especially if you could do something like:
sum($PASTE$) as $PASTE$
So that you could cut out a column name MyColumn out of a select list and replace it with sum(MyColumn) as MyColumn...
-
Doug commented
YES! YES! YES! I've suggested this in the past.