Click here to Skip to main content
Click here to Skip to main content

SnipPit - A Snippet Repository

By , 12 May 2008
 

SnipPit2.jpg

SnipPit3.jpg

Introduction

SnipPit is a Visual Studio (VS) 2008 Add-In (and a desktop application is included too) that allows for storing, retrieving, and searching for code snippets. It allows for keywords, code/language types (C#, VB, C++, etc.; you could even use this for code categories I suppose, if you really wanted to), multiple users, public and private snippets. It also provides a right-click menu within VS, and comes with a desktop program for use in apps other than VS. I wrote it for my personal use, but have seen others requesting snippet functionality like this, so I figured I'd share it.

Using the code

Install the Desktop Version first (binary) to get all the files in the right places. There is a ReadMe .rtf and .doc that are the same. Read one of them! You'll have to install the add-in source, and compile and run it to install it and be able to use it (it's all in the ReadMe).

Points of interest

I think I did at least a half-way decent job to make the code readable, usable, and efficient, but I'm quite sure it could be improved in all of those areas. I hope it is helpful/useful to many.

History

  • v1.0 - First public release.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Marckus
United States United States
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralError trying to retrieve SnippetmemberPeterA19 May '08 - 19:13 
Hi,
Been looking for something like this for a long time..
I am having trouble trying to retrieve snippets from the database.. When I enter a KeyWord and select search I get "Error: Invalid object name 'SnippetsJKeywords'"
 
Regards..
Peter
AnswerRe: Error trying to retrieve Snippetmembermarckusdavis5 Jun '08 - 4:03 
Sorry Peter,
 
I meant to get back to you sooner, life has intruded big time! I can only guess that in your case, your keywords are not separated by spaces. I apologize for the limitation, but again I wrote it for my own use and thought it might be helpful to share it. If you used something other than spaces, you may be able to just change the contents of the variable(s) in the program (the variable "aspace" for example) to contain the delimiter that you used and it might just work like that. I should have mentioned that you have to use a space unless you update the code in the instructions, but I forgot about it.
GeneralCool ideamemberkissdznuts12 May '08 - 10:06 
I give you credit for a cool idea.
 
Suggestions:
1. Combine all the SQL scripts into one script.
2. When running with the following settings:
Name of server
0
Password
 
It'd be nice if the user name entered was just defaulted as the author. It would also be nice if the name was retained so that each time the Add snippet and the Get/Edit/Delete buttons are used you don't have to reenter it every time.
 
I'll play around with it more tomorrow.
AnswerRe: Cool ideamemberMarckus13 May '08 - 3:19 
I haven't experienced the problem you are describing with having to reenter the name every time because I always use "-1" instead of "0" (I added a few things to make it more useful for people without a lot of testing because I wrote it for me and use it regularly without the additions). I'll look into adding that as it would get to be quite painful! Thanks for the helpful comments/critique.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web01 | 2.6.130523.1 | Last Updated 12 May 2008
Article Copyright 2008 by Marckus
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid