Copy and Paste Snippets
MikeONeill
Posts: 131
If you decide after the event that a bit of code you have written would be nice to have as a Snippet .you don't seem to be able to copy and paste it into a new snippet editor box
You have to re type the lot .
I suspect more than a nice to have if you really want the productivity benefits of snippets
Have I missed something ?
You have to re type the lot .
I suspect more than a nice to have if you really want the productivity benefits of snippets
Have I missed something ?
Comments
If you copy the text, you want as the snippet, from the query pane. Then go to the Options, click on the Snippets tab and click New... You should be able to paste the code into the Code: box.
I'm using SQL Prompt 3.1.0.40 on WinXP SP2. I tried this from both QA and SMSS.
For now I'm just editing the SQL Prompt 3 Snippets.xml directly.
is there any workaround - can i put it in a file on the local disk that prompt reads from? i would hate to type the lines i have to paste...
SQL Prompt 3 Snippets.xml
in Vista its in:
C:\Users\YOURUSER-SAMACCOUNTNAME\AppData\Local\Red Gate\SQL Prompt 3to make it easy i created a snippit thru the options screen just to get it to create all the nodes... then i went into the xml file and replaced the <Code> text.... I tested using the CDATA tag so that the xml parser wouldnt trip over my sql - it worked great.....
<Code>
<![CDATA[
YOUR SQL SNIPPIT GOES HERE
]]>
</Code>
I have just tried again and RH mouse doesn't give a context menu and Ctr V fails as well
It fails for both New and Edit snippets
It may be a setting but I get the same behaviour on 2 PC's
c:\documents and settings\your profile name\application data\local...\....[the rest of the path in the message above]
or you can just search your harddisk for the xml file name too...