Code Collector Pro Manual

Welcome to the Code Collector Pro support page. This acts as a combined support guide and user manual to help you use Code Collector Pro. You can use the links on the right to access the different sections of the manual. If you have a problem that isn't in this manual then you can contact us with our contact form.

Getting Started

Welcome to Code Collector Pro, snippets++. This section will get you started with Code Collector Pro and give you a quick tour of the interface. If you haven't done already you'll need to download the latest version from here

Installation

Installing Code Collector Pro is easy. After you have downloaded the disk image simply mount it by double clicking on it (if it isn't already mounted). Then drag Code Collector Pro to the Applications folder. You may want to put Code Collector Pro in your dock for easy access.

Registration

If you haven't registered Code Collector Pro you will be greeted with the registration dialogue. This pops up on launch until you register Code Collector Pro. You are also limited to 30 snippets and 5 groups in your database until you register. If you haven't purchased a licence yet you can go to our store by clicking on the Buy Licence button. Once you have bought a licence, enter the details from your email into the text fields and click Register. If you do not wish to register Code Collector Pro yet you can click Later to use Code Collector Pro with the limitations

The Code Collector Pro Interface

Code Collector Pro's UI is similar to many applications on Mac OS X such as Apple's Mail application. On the left is your source list (1). This contains your library and any groups you have made. In the top right is the snippets list (2). This shows all the snippets in the library or group selected on the left. From here you can change the name, language and licence of the snippet. To add and delete snippets use the toolbar icons in the top left. To access more details about the selected snippet click on the info button into the toolbar. Below the snippet list is the code view (3). This is where you enter your code snippets. The syntax highlighting, font and line numbers can be modified in the preferences. To search through your snippets simply enter a search term into the search field (4). You can narrow the search criteria by clicking on the magnifying glass on the left of the field. To add a new group you can click on the + button at the bottom of the source list (5). For more options click on the action button next to it



What's new in 1.3

Code Collector Pro 1.3 brings a large number of new features and bug fixes. Below are some of the highlights over previous versions.

Snippet Search Panel

Version 1.3 brings the new Snippet Search Panel, which makes it easier than ever to get your snippets from Code Collector Pro and into your documents. Search, select and insert snippets from anywhere on your system without having to lift your hands from the keyboard.

Improved Languages Preferences

The languages preferences pane has been massively re-organised to allow you to add and rename languages without the need for TextMate bundles

Install Bundles From Within CCP

In order to gain syntax highlighting and other language specific functionality in Code Collector Pro you need to install Textmate bundles. Version 1.3 makes this even easier by providing 1 click installation of the latest bundles straight from the online bundle repository

Drag & Drop Files Into CCP

Files can now be dragged directly into Code Collector Pro to add them to your library. Code Collector Pro will also use any bundles you have installed to autofill the language from the file extension.



FAQs

Below is a collection of the most frequently asked questions for Code Collector Pro.

What is Code Collector Pro?

Code Collector Pro lets developers organise, use and share snippets of code they find useful, keeping them in a central searchable database rather than having to search through 1000s of lines of source code or 100s of pages of documentation.


How much does CodeCollector.net cost?

CodeCollector.net is a completely free service and doesn't cost you a penny.


Where can I find more TextMate bundles?

Bundles are available from the subversion bundle repository. You can also install them from within Code Collector Pro, check out the preferences section of the manual for more details.


Help, there's a snippet/group stuck on CodeCollector.net! How do I get rid of it?

Occasionally you may get snippets or groups that are stuck on CodeCollector.net with no way to get rid of them. If this happens you can "clean" your online account by disabling sharing in the preferences and then closing the preferences window. Then start sharing to re-sync your shared snippets. If you find this happens consistently when you perform a specific action then please contact us with details so we can fix it in a future release.


What happened to Code Collector Lite?

Code Collector Lite development has stopped and no new versions will be released. The development was complicating the development of Pro and so the decision was made to scrap it. It is still available for download from here but comes with no support and is not compatible with libraries from Code Collector Pro 1.3 or later



Snippets

To add and remove snippets click on the toolbar buttons or choose Add or Remove Snippet from the Snippets menu. To edit a snippet's information you need to bring up the Snippet Info panel either by pressing the Info toolbar button or choosing Show Snippet Info from the Snippets menu. From here you can change various attributes about the metadata.

If you enter in a valid URL into the source field (either http://, file:// or svn://) then the go to button will be enabled. If you click on this you will be taken to the location. By changing the language of the snippet you also change the syntax highlighting. The language list will contain all installed languages.

At the bottom of the Snippet Info panel you can lock the editing of a snippet in the code area. This will prevent any editing in the code area when this snippet is selected, though you will still be able to edit the attributes and select and copy from the code area. The button on the bottom right shows whether a snippet is shared. When a snippet is shared on CodeCollector.net this button will appear green and be clickable. Clicking on it will take you to the snippet online.

There is now enhanced support for dragging and dropping snippets to and from Code Collector Pro. Simply drag a snippet in the snippets table, just as you would for adding to a group, and drop it onto another application to have the code inserted. You can also select some text in another application and drag it into the source list in Code Collector Pro to create a new snippet with that text



Groups

To create a group click on the + button at the bottom of the source list or choose New Group from the source list action menu (the cog). Normal groups are similar to playlists in iTunes. Simply drag a snippet to it in the source list to add it to the group, and press the delete or backspace key on a snippet in a group to remove it from a group. To rename a group, double click on it's name in the source list. If you have several snippets selected then you can create a new group from these by selecting New Group With Selected Snippets from the source list action menu.

To create a smart group choose New Smart Group... from the source list action menu. This will present you with a dialogue for you to choose the criteria which to select snippets by. Add/Remove criteria by clicking on the +/- buttons on each rule. When you click OK a new smart group will be created.



Import/Export

Code Collector Pro adds new Import/Export options. You can Export your entire snippets library as a text file by choosing Export Library as Plain Text from the file menu. You can also create snippet files containing single or multiple snippets that let you share code with others. To create a snippet file select the snippets you want to include and choose Export Selected Snippets from the file menu. To import these either double click on them in Finder or choose Import Snippets from the file menu



Searching

New in Code Collector Pro 1.3 is the snippet search panel. This greatly simplifies getting your snippets out of Code Collector Pro and into your files. You can set a global hotkey in the General Preferences that can be used to bring up the snippet search panel anywhere on the system. You can filter your snippets down using the search field at the top of the panel. Once you have filtered down your snippets you can select a snippet using the up and down arrows on your keyboard. Once selected pressing return or end will insert the snippet into your frontmost application.



Online Sharing

Code Collector Pro integrates with our online snippet sharing service CodeCollector.net. In order to start sharing go to the preferences window and select Sharing. Clicking on the Enable Sharing checkbox turns on sharing and reveals more options. Before you can share your snippets online you need to get an account on CodeCollector.net. If you already have an account, just enter your login details into the fields provided, otherwise click on Get an Account to get registered from within Code Collector Pro.

Once you have enabled sharing and entered in your account details click on the Groups tab. By default Code Collector Pro is set to share selected Groups so that no snippets are yet shared. You can share a group by selecting it in the table view. Alternatively you can right click on it in the source view and selecting Start sharing group. You can also choose to share your entire library online. This will share all your groups and snippets.

NB: Be careful when sharing Smart Groups as snippets you may not want to appear online may be shared.

You can also download snippets into Code Collector Pro (or Lite) by clicking on the Send to Code Collector link on any snippet on CodeCollector.net.



Preferences

Code Collector Pro has 5 sections to preferences:

General Preferences

General Preferences allows you to set whether the main browser window or the snippet search panel will be shown at launch, what the default language and licence is for new snippets, the hotkey for the search panel and whether Code Collector Pro should check for updates on launch.

Text Editor

The settings in here control various aspects of the Text Editor. You can set the default font by clicking the Edit button and choosing a new font from the font picker. You can disable line numbers and syntax highlighting by using the checkboxes. If you have syntax highlighting enabled you can customise the colours by selecting the syntax element from the pop up button and then clicking on the colour well. You can also modify the background colour of the text view.

Languages

From here you manage the languages in Code Collector Pro. To add or remove languages use the + and - buttons below the table on the left. To enable/disable a language click on the checkbox next to its name (NB: disabling a language will disassociate it with any/all snippets assigned to that language).

In order to gain syntax highlighting and other language related functionality you will want to associate a bundle and syntax file with a language. To select a bundle click the Choose button to bring up the bundle selection sheet. From here you can choose from the built in bundles included with Code Collector Pro, any bundles you have installed and, if you have TextMate installed, all bundles from TextMate. You can also install new bundles from this sheet, by switching to the install view, selecting a bundle and clicking Install.

Sharing

This pane allows you to configure you settings for sharing with CodeCollector.net. For information on how this panel works please read the manual section on sharing