← All posts
Julien Delange Thursday, September 15, 2022

How to share Code Snippets with your team

Share

AUTHOR

Julien Delange, Founder and CEO

Julien is the CEO of Codiga. Before starting Codiga, Julien was a software engineer at Twitter and Amazon Web Services.

Julien has a PhD in computer science from Universite Pierre et Marie Curie in Paris, France.

See all articles

As developers, we all love to keep code snippets we can reuse later. Keeping track of our snippets in a document avoids searching for the same code block continuously and makes us more productive.

However, there is no great solution for sharing code snippets with your team. Existing solutions work well in the local development environment, but no tool helps you save and share code snippets with your team.

In this article, we explain how to create a private code snippet on Codiga and share it with your team.

Create a Code Snippet

First, install the Codiga IDE plugin for your environment. Codiga is currently integrated with VS Code and the JetBrains code editors.

Once the plugin/extension is installed, select the code you want to share, right-click and select Create Code Snippet.

Create a Code Snippet

Once you create the code snippets, you can edit metadata to make the snippet easily discoverable on the Codiga Hub and all the Codiga Applications. Edit the metadata and make sure you add at least three keywords.

Code Snippet Metadata

Share a Code Snippet with your Team

With Codiga, sharing a private code snippet requires just a click. When editing the code snippet, go to the Groups tab and select the group you want to share the snippet with.

Create a Code Snippet

Once shared, the code snippet is visible in the Group Sharing tab of the Coding Assistant. You can list all the shared snippets with your group, as shown below.

Create a Code Snippet

Using Code Snippets from your team

Once code snippets are shared, this is time to use them! Once you are in VS Code, add your Codiga API token to your preferences.

Then, open the Codiga search snippets feature (CMD + SHIT + C for VS Code) and enter the keywords of your snippet.

Code Snippets Search

Alternatively, you can start a command in a file and enter the code snippets keyword in the comment: Codiga will then suggest the snippet for you.

Inline Insertion

Search your Team Code Snippets on Desktop

When you are not coding (but reviewing code or just providing guidance to a colleague), you often want to access your code snippets.

For this use case, Codiga has a desktop app that lets you search and find code snippets, including the ones shared with your team.

List of snippets for the team

You can then easily list all snippets and cookbooks shared with your team and also view and easily copy them.

Shared Snippets

Try Codiga

Schedule a demo

Code analyzed in seconds with Codiga Automated Code Reviews.

Write code faster with the Codiga Coding Assistant.

Let's talk!