Codiga has joined Datadog!

Read the Blog·

Interested in our Static Analysis?

Sign up
← All posts
Julien Delange Thursday, January 27, 2022

How to share code snippets in 2022

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

It's 2022 and some developers are still saving code snippets locally while there are solutions to save them online and reuse them across multiple IDE.

Creating and sharing code snippets

VS Code

Sharing a snippet in VS Code has never been more easy. With the Codiga VS Code extension, select the code you want to share, right click and select Create Recipe.

Create a snippet from Vs Code

Make sure you fill the keywords section as this is how the snippet is found when developers look for a snippet in their IDE with Codiga.

JetBrains (CLion, IntelliJ, PyCharm, etc)

As with VS Code, sharing a snippet is done with few clicks. With the Codiga JetBrains extension, just do the following:

  1. Select the code you want to share
  2. Right click and select Create Codiga Recipe
  3. Fill the information on Codiga

Make sure you fill the keywords section as this is how the snippet is found when developers look for a snippet in their IDE with Codiga.

Create a snippet from JetBrains

Google Chrome

You can also create snippets directly in Chrome! Make sure you install the Codiga Chrome extension and:

  1. Select the code you want to share
  2. Right click and select Create Codiga Recipe
  3. Fill the information on Codiga

Make sure you fill the keywords section as this is how the snippet is found when developers look for a snippet in their IDE with Codiga.

Create a snippet from Chrome

Using a snippet

VS Code

Using a snippet is even easier than creating it! In VS Code, type ⌘ + SHIFT + C to open the snippet finder, type the keywords and select the snippet you want to import!

Use a code snippet in VS Code

JetBrains products

As with VS Code, using a snippet in JetBrains products is really straightforward. Open the snippet finder using ⌘ + ALT + C, enter the keywords you are looking for and select the code you want to import.

Use a code snippet in IntelliJ

Finding snippets

You can find snippets, rate and comment on them on the Codiga marketplace. It contains hundreds of snippets for 15+ languages.

Links

Are you interested in Datadog Static Analysis?

Sign up