How to manage your code snippets, the easy way
Tags: productivity, discuss, programming, opensource
Published: 2020-04-15 05:07:31

---
title: How to manage your code snippets, the easy way  
published: true
description: 
tags: productivity, discuss, programming, opensource
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wppk0a77u6moy3berlgf.png
series: Efficient management of dev bookmarks and code snippets
---

Remember [how I manage my dev bookmarks to save time and nerves](https://dev.to/ama/how-i-manage-my-dev-bookmarks-and-save-time-and-nerves-56ae)? Well, many times I find myself bookmarking links just for some pieces of code that I find in the link. I would then add the code snippets the bookmark's description and the rest is not that relevant. Or there are times when I know I have this piece of code some "old" project and I need to really dig for some time to get it...

Well, to make my life easier in these cases I implemented a feature to save code snippets on [Codever](https://www.codever.land). In one entry you can save
- one or more related code snippets
- add a title
- tags to it
- (optionally) a source URL for your inspiration
- and comments about the snippets.

> It's similar to Github's gists, but I think is user friendlier and easier to browse through my snippets.  

## Save code snippets

### Browser Extension
You can use the [Codever browser extensions](), which is [open source](https://github.com/codeverland/codever-browser-extension) to help you easily save code snippets from webpages. The extension is available for:
* [Chromium browsers](https://chrome.google.com/webstore/detail/codever/diofdblfhjbpgackifolmboaiccmebjb)
* [Firefox](https://addons.mozilla.org/addon/codever/)

Just select the code snippet and then right click or click on the extension:
![Save code snippet chrome extension in action](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cigkr5z9tle5kjqtkjpf.gif)
 

### [Bookmarklet](https://www.codever.land/howto/bookmarklets)
If for some reason you can't use browser extension or don't want to permit popup windows (in the case of Firefox they are disabled by default) you can use our [+Codever bookmarklet](https://www.codever.land/howto/bookmarklets) to achieve the same result:

![Save snippet via bookmarklet](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ukxmk1yjq3k1vk0g0ac1.gif)

### IntelliJ Plugin
If you use IntelliJ products I have developed a plugin to make it ease from IDE:

 ![Save to Codever from IntelliJ Plugin showcase](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ltafwzwn6hlnf0t4ik0o.gif)

> The plugin is available to download and install in
> [JetBrain Plugins Repository](https://plugins.jetbrains.com/plugin/14456-codever-snippets/) and the source code is available on [Github](https://github.com/codeverland/codever-intellij-plugin)

### For everything else
You can save code snippets from some place else via the [**+ > Snippet**](https://www.codever.land/my-snippets/new) option in the menu bar:

![Save snippet from menu bar](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9r3xet7jp4k7hel9riyc.png)

<hr/>

## Search code snippets on Codever
To search for **code snippets** just select **My Snippets** option in the search bar:

![Search my snippets](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/agyvfo62b23n8jy4xdvj.gif)

> You can use a web search on [AlfredApp](https://www.alfredapp.com/) or similar, with a custom query for a quick access - `https://www.codever.land/search?q={query}&sd=my-snippets`

## Next steps
I have a couple of ideas in mind how will I extend this functionality. Among others:
- create Visual Studio Code extension similar to the IntelliJ Plugin present before to save code snippets directly from VS Code

What do you think? Is it something you might use? I hope you can give it a try and leave your feedback in the comments bellow. Thanks